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-04-20 08:50:06Z]: 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: 70f116ec-c733-4ccc-b1f3-79a8e3cc0c00 Correlation ID: 3ffa5835-c90c-4ba5-aa38-656c5565da4d Timestamp: 2026-04-20 08:50:06Z - Correlation ID: 3ffa5835-c90c-4ba5-aa38-656c5565da4d - Trace ID: 70f116ec-c733-4ccc-b1f3-79a8e3cc0c00
(node:6140) [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-04-20 08:50:06Z]: 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: b8df5ed0-5159-4e08-b0ef-7aa17b040800 Correlation ID: 52ff72fd-c3fb-4b88-aa6e-78a097dd3e5f Timestamp: 2026-04-20 08:50:06Z - Correlation ID: 52ff72fd-c3fb-4b88-aa6e-78a097dd3e5f - Trace ID: b8df5ed0-5159-4e08-b0ef-7aa17b040800
Error getting the secret: invalid_client: 7000222 - [2026-04-20 08:50:06Z]: 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: 1529a473-0316-408e-b81c-7790ea210700 Correlation ID: 50980644-88b9-4d5a-a01d-032b1a667d5e Timestamp: 2026-04-20 08:50:06Z - Correlation ID: 50980644-88b9-4d5a-a01d-032b1a667d5e - Trace ID: 1529a473-0316-408e-b81c-7790ea210700
Error getting the secret: invalid_client: 7000222 - [2026-04-20 08:50:06Z]: 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: d8b3c171-e183-4283-b8bc-6fef75880c00 Correlation ID: 0d76f1e4-ec6a-40ad-81d2-11f4d9287a15 Timestamp: 2026-04-20 08:50:06Z - Correlation ID: 0d76f1e4-ec6a-40ad-81d2-11f4d9287a15 - Trace ID: d8b3c171-e183-4283-b8bc-6fef75880c00
Error getting the secret: invalid_client: 7000222 - [2026-04-20 08:50:07Z]: 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: 6864fdff-3c39-4948-bc49-a404bde20700 Correlation ID: cf3689e6-aca7-4967-97ea-e84429718bbf Timestamp: 2026-04-20 08:50:07Z - Correlation ID: cf3689e6-aca7-4967-97ea-e84429718bbf - Trace ID: 6864fdff-3c39-4948-bc49-a404bde20700
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)