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-10-05 10:16:44Z]: 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: e9b8a917-d231-46a6-b47a-2681096cba00 Correlation ID: cb8992c2-1f08-4144-930a-f0aa61758348 Timestamp: 2026-10-05 10:16:44Z - Correlation ID: cb8992c2-1f08-4144-930a-f0aa61758348 - Trace ID: e9b8a917-d231-46a6-b47a-2681096cba00
(node:2528) [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-10-05 10:16:44Z]: 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: b0bca4da-c86e-4864-9e18-7af5c015b600 Correlation ID: e0a46a75-91d8-4cb5-a316-f07852c31245 Timestamp: 2026-10-05 10:16:44Z - Correlation ID: e0a46a75-91d8-4cb5-a316-f07852c31245 - Trace ID: b0bca4da-c86e-4864-9e18-7af5c015b600
Error getting the secret: invalid_client: 7000222 - [2026-10-05 10:16:44Z]: 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: ec82c3ef-5656-456d-af94-fd08a22cd500 Correlation ID: 4911ac9f-0b8a-4e0d-9f3c-2245516096a8 Timestamp: 2026-10-05 10:16:44Z - Correlation ID: 4911ac9f-0b8a-4e0d-9f3c-2245516096a8 - Trace ID: ec82c3ef-5656-456d-af94-fd08a22cd500
Error getting the secret: invalid_client: 7000222 - [2026-10-05 10:16:44Z]: 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: f44a76ca-326d-4b12-afe2-a5e6a3742601 Correlation ID: 5ddb4359-82c6-42c3-b0df-4b484a57861e Timestamp: 2026-10-05 10:16:44Z - Correlation ID: 5ddb4359-82c6-42c3-b0df-4b484a57861e - Trace ID: f44a76ca-326d-4b12-afe2-a5e6a3742601
Error getting the secret: invalid_client: 7000222 - [2026-10-05 10:16:44Z]: 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: ec82c3ef-5656-456d-af94-fd08a92cd500 Correlation ID: 428d73cc-6f1d-45b3-a591-4d4518b5c7b9 Timestamp: 2026-10-05 10:16:44Z - Correlation ID: 428d73cc-6f1d-45b3-a591-4d4518b5c7b9 - Trace ID: ec82c3ef-5656-456d-af94-fd08a92cd500
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)