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-27 23:44:29Z]: 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: 49d6bbca-3599-4149-9193-a5b366cf2800 Correlation ID: 64eb8567-a0fa-496c-85e4-5a745d0c638c Timestamp: 2026-02-27 23:44:29Z - Correlation ID: 64eb8567-a0fa-496c-85e4-5a745d0c638c - Trace ID: 49d6bbca-3599-4149-9193-a5b366cf2800
(node:1956) [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-27 23:44:29Z]: 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: cc864ed0-f2b7-4eda-a454-8ca364952800 Correlation ID: a7efada6-8892-466b-99b9-8ceecf7fbcf8 Timestamp: 2026-02-27 23:44:29Z - Correlation ID: a7efada6-8892-466b-99b9-8ceecf7fbcf8 - Trace ID: cc864ed0-f2b7-4eda-a454-8ca364952800
Error getting the secret: invalid_client: 7000222 - [2026-02-27 23:44:30Z]: 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: d0da4e0e-5474-4e4b-b21e-3aa910314200 Correlation ID: bd01dd80-2472-4be0-90a3-d6042eb60af4 Timestamp: 2026-02-27 23:44:30Z - Correlation ID: bd01dd80-2472-4be0-90a3-d6042eb60af4 - Trace ID: d0da4e0e-5474-4e4b-b21e-3aa910314200
Error getting the secret: invalid_client: 7000222 - [2026-02-27 23:44:30Z]: 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: 907ae0b5-0f0a-420e-be8e-ab64500c3200 Correlation ID: a39f3c7c-3ebc-42e4-8f1c-4eefbe2cdf0e Timestamp: 2026-02-27 23:44:30Z - Correlation ID: a39f3c7c-3ebc-42e4-8f1c-4eefbe2cdf0e - Trace ID: 907ae0b5-0f0a-420e-be8e-ab64500c3200
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)