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-17 09:44:32Z]: 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: 8ff0e1cd-8830-441b-82f8-c866a0a14300 Correlation ID: c0c165cd-41cd-4b24-b606-16e5b4389edf Timestamp: 2026-07-17 09:44:32Z - Correlation ID: c0c165cd-41cd-4b24-b606-16e5b4389edf - Trace ID: 8ff0e1cd-8830-441b-82f8-c866a0a14300
(node:2800) [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-17 09:44:32Z]: 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: 2b07d170-342b-4f4b-87d9-48e9d9674200 Correlation ID: 15fa70dc-9e82-4b70-a153-b15ad535e8c6 Timestamp: 2026-07-17 09:44:32Z - Correlation ID: 15fa70dc-9e82-4b70-a153-b15ad535e8c6 - Trace ID: 2b07d170-342b-4f4b-87d9-48e9d9674200
Error getting the secret: invalid_client: 7000222 - [2026-07-17 09:44:32Z]: 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: d9844205-8d27-4ba0-a8d1-f13f4a733800 Correlation ID: 861b0f43-ae35-4783-a710-cfa8a06723e5 Timestamp: 2026-07-17 09:44:32Z - Correlation ID: 861b0f43-ae35-4783-a710-cfa8a06723e5 - Trace ID: d9844205-8d27-4ba0-a8d1-f13f4a733800
Error getting the secret: invalid_client: 7000222 - [2026-07-17 09:44:33Z]: 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: 8ff0e1cd-8830-441b-82f8-c866bea14300 Correlation ID: 5e9affbe-5a4b-4653-a6c5-a24fe2327fd1 Timestamp: 2026-07-17 09:44:33Z - Correlation ID: 5e9affbe-5a4b-4653-a6c5-a24fe2327fd1 - Trace ID: 8ff0e1cd-8830-441b-82f8-c866bea14300
Error getting the secret: invalid_client: 7000222 - [2026-07-17 09:44:33Z]: 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: 6d4b3ac9-3372-4106-9572-9d6b1d1e1200 Correlation ID: f75962bd-c09d-4582-a26b-896d72a87602 Timestamp: 2026-07-17 09:44:33Z - Correlation ID: f75962bd-c09d-4582-a26b-896d72a87602 - Trace ID: 6d4b3ac9-3372-4106-9572-9d6b1d1e1200
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)