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-07-18 01:44:49Z]: 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: c51e65a2-1352-426e-99f5-61f2e0e15700 Correlation ID: 729a8c72-f60b-499e-b55b-be9ae52568be Timestamp: 2026-07-18 01:44:49Z - Correlation ID: 729a8c72-f60b-499e-b55b-be9ae52568be - Trace ID: c51e65a2-1352-426e-99f5-61f2e0e15700
(node:5156) [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-07-18 01:44:50Z]: 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: 3d779cc7-9d74-4d7b-9800-3a83567b0200 Correlation ID: cbda3fe9-c06b-4a21-9b37-54557e56ee36 Timestamp: 2026-07-18 01:44:50Z - Correlation ID: cbda3fe9-c06b-4a21-9b37-54557e56ee36 - Trace ID: 3d779cc7-9d74-4d7b-9800-3a83567b0200
Error getting the secret: invalid_client: 7000222 - [2026-07-18 01:44:50Z]: 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: 8998d850-af74-44d1-96d2-f66b3db14900 Correlation ID: aec946b9-5ebe-4565-9ee7-48a2cd98221b Timestamp: 2026-07-18 01:44:50Z - Correlation ID: aec946b9-5ebe-4565-9ee7-48a2cd98221b - Trace ID: 8998d850-af74-44d1-96d2-f66b3db14900
Error getting the secret: invalid_client: 7000222 - [2026-07-18 01:44:50Z]: 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: c51e65a2-1352-426e-99f5-61f2ede15700 Correlation ID: 83d7de87-d7f5-4bae-81de-d2df65330e22 Timestamp: 2026-07-18 01:44:50Z - Correlation ID: 83d7de87-d7f5-4bae-81de-d2df65330e22 - Trace ID: c51e65a2-1352-426e-99f5-61f2ede15700
Error getting the secret: invalid_client: 7000222 - [2026-07-18 01:44:51Z]: 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: a27736da-68e7-45fa-9c61-e8b0a4973700 Correlation ID: 67ec03dc-4afa-450c-85bb-d2d945e6438a Timestamp: 2026-07-18 01:44:51Z - Correlation ID: 67ec03dc-4afa-450c-85bb-d2d945e6438a - Trace ID: a27736da-68e7-45fa-9c61-e8b0a4973700
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:30:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)