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-04 22:47:53Z]: 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: 17e368cc-3c07-41c7-bffd-165a36a8ba00 Correlation ID: 24b8fd4c-0310-4070-9364-518355b2a93d Timestamp: 2026-10-04 22:47:53Z - Correlation ID: 24b8fd4c-0310-4070-9364-518355b2a93d - Trace ID: 17e368cc-3c07-41c7-bffd-165a36a8ba00
(node:5348) [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-04 22:47:53Z]: 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: 8ac17e44-1310-4ae3-9734-a6a28db6b300 Correlation ID: 728b0141-dc91-4980-b9fd-b02b7d6c4982 Timestamp: 2026-10-04 22:47:53Z - Correlation ID: 728b0141-dc91-4980-b9fd-b02b7d6c4982 - Trace ID: 8ac17e44-1310-4ae3-9734-a6a28db6b300
Error getting the secret: invalid_client: 7000222 - [2026-10-04 22:47:53Z]: 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: 0aaf2c4d-54c8-4c10-8137-db5af6f8c000 Correlation ID: 38ab2992-e7ed-4ecf-8f7b-b0bd51c808e5 Timestamp: 2026-10-04 22:47:53Z - Correlation ID: 38ab2992-e7ed-4ecf-8f7b-b0bd51c808e5 - Trace ID: 0aaf2c4d-54c8-4c10-8137-db5af6f8c000
Error getting the secret: invalid_client: 7000222 - [2026-10-04 22:47:54Z]: 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: d9ed1a83-e9b5-406b-b80a-b28e4ee79500 Correlation ID: 99741672-6779-4a0b-b881-02d4ab2575d1 Timestamp: 2026-10-04 22:47:54Z - Correlation ID: 99741672-6779-4a0b-b881-02d4ab2575d1 - Trace ID: d9ed1a83-e9b5-406b-b80a-b28e4ee79500
Error getting the secret: invalid_client: 7000222 - [2026-10-04 22:47:54Z]: 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: d9ed1a83-e9b5-406b-b80a-b28e61e79500 Correlation ID: 74fde46e-f7fb-4fb9-9618-05dc2bfa1fa7 Timestamp: 2026-10-04 22:47:54Z - Correlation ID: 74fde46e-f7fb-4fb9-9618-05dc2bfa1fa7 - Trace ID: d9ed1a83-e9b5-406b-b80a-b28e61e79500
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)