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-24 18:28: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: c6e7f46f-ab68-4a95-be5f-3cf9891b4100 Correlation ID: d5c95374-2edb-4b5f-8ab8-1261c0948f6e Timestamp: 2026-07-24 18:28:29Z - Correlation ID: d5c95374-2edb-4b5f-8ab8-1261c0948f6e - Trace ID: c6e7f46f-ab68-4a95-be5f-3cf9891b4100
(node:3044) [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-24 18:28: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: 10b07069-3b88-4477-a569-6b3c89221500 Correlation ID: baf61728-4419-48c4-814d-07f07ffcec01 Timestamp: 2026-07-24 18:28:29Z - Correlation ID: baf61728-4419-48c4-814d-07f07ffcec01 - Trace ID: 10b07069-3b88-4477-a569-6b3c89221500
Error getting the secret: invalid_client: 7000222 - [2026-07-24 18:28: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: b268290f-e07a-4ca1-b0ba-04ab7c3a4300 Correlation ID: a5d33506-ab26-4463-831a-4429995a2068 Timestamp: 2026-07-24 18:28:29Z - Correlation ID: a5d33506-ab26-4463-831a-4429995a2068 - Trace ID: b268290f-e07a-4ca1-b0ba-04ab7c3a4300
Error getting the secret: invalid_client: 7000222 - [2026-07-24 18:28: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: a6d7a758-fc50-40eb-8aee-a304168f3d00 Correlation ID: a63ae99c-a801-40b9-90db-357b9fe8c13d Timestamp: 2026-07-24 18:28:29Z - Correlation ID: a63ae99c-a801-40b9-90db-357b9fe8c13d - Trace ID: a6d7a758-fc50-40eb-8aee-a304168f3d00
Error getting the secret: invalid_client: 7000222 - [2026-07-24 18:28: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: d6b0f6a3-4c58-46a8-ad6d-119b2f4e3800 Correlation ID: 46c32983-b9a1-4ff8-87ce-3ef570dc328d Timestamp: 2026-07-24 18:28:29Z - Correlation ID: 46c32983-b9a1-4ff8-87ce-3ef570dc328d - Trace ID: d6b0f6a3-4c58-46a8-ad6d-119b2f4e3800
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)