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-20 05:52: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: b1e593e1-7a94-4b33-a1fd-aa65eea60400 Correlation ID: ea47172b-5fb1-4cac-885f-7f77b21e0ddf Timestamp: 2026-07-20 05:52:06Z - Correlation ID: ea47172b-5fb1-4cac-885f-7f77b21e0ddf - Trace ID: b1e593e1-7a94-4b33-a1fd-aa65eea60400
(node:5724) [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-20 05:52: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: 04054293-4ba5-47ea-903f-6b39fe010400 Correlation ID: 0f4be151-1f76-4d2b-b8d1-5570416e18e5 Timestamp: 2026-07-20 05:52:06Z - Correlation ID: 0f4be151-1f76-4d2b-b8d1-5570416e18e5 - Trace ID: 04054293-4ba5-47ea-903f-6b39fe010400
Error getting the secret: invalid_client: 7000222 - [2026-07-20 05:52: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: 30265ccb-8f29-4261-925a-29d1287e2600 Correlation ID: ad2db6c6-c736-45be-9f04-75d7f2d100c9 Timestamp: 2026-07-20 05:52:06Z - Correlation ID: ad2db6c6-c736-45be-9f04-75d7f2d100c9 - Trace ID: 30265ccb-8f29-4261-925a-29d1287e2600
Error getting the secret: invalid_client: 7000222 - [2026-07-20 05:52: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: 04054293-4ba5-47ea-903f-6b3909020400 Correlation ID: dac6a9ca-a17e-4f1e-bb41-792178789296 Timestamp: 2026-07-20 05:52:06Z - Correlation ID: dac6a9ca-a17e-4f1e-bb41-792178789296 - Trace ID: 04054293-4ba5-47ea-903f-6b3909020400
Error getting the secret: invalid_client: 7000222 - [2026-07-20 05:52: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: e947a095-c460-40c2-aa4a-30f2e9420300 Correlation ID: 228f8c5c-072b-43eb-bbff-d88580746de7 Timestamp: 2026-07-20 05:52:06Z - Correlation ID: 228f8c5c-072b-43eb-bbff-d88580746de7 - Trace ID: e947a095-c460-40c2-aa4a-30f2e9420300
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)