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-02-26 08:17:34Z]: 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: 0f777a7b-4b68-44ee-83d7-09c08d7c1a00 Correlation ID: 725026a9-3a88-4391-a6be-e331e160e470 Timestamp: 2026-02-26 08:17:34Z - Correlation ID: 725026a9-3a88-4391-a6be-e331e160e470 - Trace ID: 0f777a7b-4b68-44ee-83d7-09c08d7c1a00
(node:1084) [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-02-26 08:17:34Z]: 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: 8f3c3a6e-fde2-4da3-8252-2d1325918200 Correlation ID: a89f749c-c4a1-4fee-baec-422dd194e031 Timestamp: 2026-02-26 08:17:34Z - Correlation ID: a89f749c-c4a1-4fee-baec-422dd194e031 - Trace ID: 8f3c3a6e-fde2-4da3-8252-2d1325918200
Error getting the secret: invalid_client: 7000222 - [2026-02-26 08:17:34Z]: 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: e660d4a0-1788-497c-b796-047d823a3600 Correlation ID: 6f6ce0d7-3006-471c-ac3d-a60253308e4f Timestamp: 2026-02-26 08:17:34Z - Correlation ID: 6f6ce0d7-3006-471c-ac3d-a60253308e4f - Trace ID: e660d4a0-1788-497c-b796-047d823a3600
Error getting the secret: invalid_client: 7000222 - [2026-02-26 08:17:35Z]: 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: e660d4a0-1788-497c-b796-047d8c3a3600 Correlation ID: 8a07b712-fb3b-4550-96e6-f969a7c7945d Timestamp: 2026-02-26 08:17:35Z - Correlation ID: 8a07b712-fb3b-4550-96e6-f969a7c7945d - Trace ID: e660d4a0-1788-497c-b796-047d8c3a3600
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)