iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

Error getting the secret: invalid_client: 7000222 - [2026-04-23 07:03:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: a6df0847-a574-4c0e-87f9-f0ee77dc1800 Correlation ID: 1cc892cb-dd7c-48bd-aaf1-9640022b66aa Timestamp: 2026-04-23 07:03:55Z - Correlation ID: 1cc892cb-dd7c-48bd-aaf1-9640022b66aa - Trace ID: a6df0847-a574-4c0e-87f9-f0ee77dc1800
(node:2664) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error getting the secret: invalid_client: 7000222 - [2026-04-23 07:03:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: acecc8a1-e11e-48dd-987e-40cec32a2d00 Correlation ID: f004323a-abec-40e0-aad6-e0a00aa8dd52 Timestamp: 2026-04-23 07:03:55Z - Correlation ID: f004323a-abec-40e0-aad6-e0a00aa8dd52 - Trace ID: acecc8a1-e11e-48dd-987e-40cec32a2d00
Error getting the secret: invalid_client: 7000222 - [2026-04-23 07:03:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 9c1d86dc-24a2-4544-95d6-f451eb3e0500 Correlation ID: e00c17e6-7ab1-4566-879a-81927bcf1b16 Timestamp: 2026-04-23 07:03:55Z - Correlation ID: e00c17e6-7ab1-4566-879a-81927bcf1b16 - Trace ID: 9c1d86dc-24a2-4544-95d6-f451eb3e0500
Error getting the secret: invalid_client: 7000222 - [2026-04-23 07:03:55Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: acecc8a1-e11e-48dd-987e-40cec72a2d00 Correlation ID: 4efd3c05-a4e7-4688-bdb8-698b12575f9c Timestamp: 2026-04-23 07:03:55Z - Correlation ID: 4efd3c05-a4e7-4688-bdb8-698b12575f9c - Trace ID: acecc8a1-e11e-48dd-987e-40cec72a2d00
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:25:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)