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-26 08:32:40Z]: 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: 126a7e89-fb4f-47de-ba96-16c46ef01a00 Correlation ID: 2f2e2403-081e-43d2-a9f5-47f754ca8ef8 Timestamp: 2026-07-26 08:32:40Z - Correlation ID: 2f2e2403-081e-43d2-a9f5-47f754ca8ef8 - Trace ID: 126a7e89-fb4f-47de-ba96-16c46ef01a00
(node:6044) [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-26 08:32:41Z]: 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: 7cc1296a-e2ab-4544-a8e0-44f74cc01200 Correlation ID: 8d291e30-ea17-44c4-9c45-ae454cc46a34 Timestamp: 2026-07-26 08:32:41Z - Correlation ID: 8d291e30-ea17-44c4-9c45-ae454cc46a34 - Trace ID: 7cc1296a-e2ab-4544-a8e0-44f74cc01200
Error getting the secret: invalid_client: 7000222 - [2026-07-26 08:32:41Z]: 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: 2107d340-6c5a-4f2a-8af5-673f83411400 Correlation ID: 352781c5-f59a-43ca-b37e-1eb3c3375e1c Timestamp: 2026-07-26 08:32:41Z - Correlation ID: 352781c5-f59a-43ca-b37e-1eb3c3375e1c - Trace ID: 2107d340-6c5a-4f2a-8af5-673f83411400
Error getting the secret: invalid_client: 7000222 - [2026-07-26 08:32:41Z]: 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: 2420940f-e2de-469c-a199-ecf1cf594d00 Correlation ID: 8d291c90-b1b3-4603-8971-58c864a10391 Timestamp: 2026-07-26 08:32:41Z - Correlation ID: 8d291c90-b1b3-4603-8971-58c864a10391 - Trace ID: 2420940f-e2de-469c-a199-ecf1cf594d00
Error getting the secret: invalid_client: 7000222 - [2026-07-26 08:32:42Z]: 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: 9c528078-6012-4aac-859c-91d14df72f00 Correlation ID: c2411e9f-705a-446c-b9c7-331718a33b0f Timestamp: 2026-07-26 08:32:42Z - Correlation ID: c2411e9f-705a-446c-b9c7-331718a33b0f - Trace ID: 9c528078-6012-4aac-859c-91d14df72f00
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)