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-04 15:31:09Z]: 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: a2c11847-676c-4a13-b5ba-a61280d20900 Correlation ID: 40d43599-1ce7-452d-bb16-65e55caac64d Timestamp: 2026-07-04 15:31:09Z - Correlation ID: 40d43599-1ce7-452d-bb16-65e55caac64d - Trace ID: a2c11847-676c-4a13-b5ba-a61280d20900
(node:376) [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-04 15:31:09Z]: 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: 8f121ae1-c39f-40ab-84be-99c5b09c0c00 Correlation ID: 1dc6489b-ff3c-4b23-9ea6-04a6eb7b63e6 Timestamp: 2026-07-04 15:31:09Z - Correlation ID: 1dc6489b-ff3c-4b23-9ea6-04a6eb7b63e6 - Trace ID: 8f121ae1-c39f-40ab-84be-99c5b09c0c00
Error getting the secret: invalid_client: 7000222 - [2026-07-04 15:31:10Z]: 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: f30b852a-3982-41cd-b40d-92cd71a70b00 Correlation ID: 09115196-1c0f-46c5-aa54-4cb191fc3c2d Timestamp: 2026-07-04 15:31:10Z - Correlation ID: 09115196-1c0f-46c5-aa54-4cb191fc3c2d - Trace ID: f30b852a-3982-41cd-b40d-92cd71a70b00
Error getting the secret: invalid_client: 7000222 - [2026-07-04 15:31:10Z]: 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: 76f139d1-4410-4c2d-b31e-568d8cd81900 Correlation ID: 31445804-dbef-4de2-bd1b-8fd8afcbbd21 Timestamp: 2026-07-04 15:31:10Z - Correlation ID: 31445804-dbef-4de2-bd1b-8fd8afcbbd21 - Trace ID: 76f139d1-4410-4c2d-b31e-568d8cd81900
Error getting the secret: invalid_client: 7000222 - [2026-07-04 15:31:10Z]: 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: 1cfa8af6-24cb-4e60-9304-30f2dcda0c00 Correlation ID: 2d25721c-cbb3-4e89-a67e-0c1ebe142b5c Timestamp: 2026-07-04 15:31:10Z - Correlation ID: 2d25721c-cbb3-4e89-a67e-0c1ebe142b5c - Trace ID: 1cfa8af6-24cb-4e60-9304-30f2dcda0c00
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)