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-06-17 18:13:55Z]: 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: d8d9ead2-f8f8-4bc5-bce7-8b1bd3806f00 Correlation ID: e1257833-2121-480b-a16f-5bbad0e96ac1 Timestamp: 2026-06-17 18:13:55Z - Correlation ID: e1257833-2121-480b-a16f-5bbad0e96ac1 - Trace ID: d8d9ead2-f8f8-4bc5-bce7-8b1bd3806f00
(node:4844) [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-06-17 18:13:55Z]: 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: 91e450d7-287c-44f9-bb82-650ad5580f00 Correlation ID: 183f0815-00fd-43b4-ae6c-3f517f766adb Timestamp: 2026-06-17 18:13:55Z - Correlation ID: 183f0815-00fd-43b4-ae6c-3f517f766adb - Trace ID: 91e450d7-287c-44f9-bb82-650ad5580f00
Error getting the secret: invalid_client: 7000222 - [2026-06-17 18:13:55Z]: 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: 91e450d7-287c-44f9-bb82-650ada580f00 Correlation ID: 578c6d77-2c21-4b66-be30-02dba68aa527 Timestamp: 2026-06-17 18:13:55Z - Correlation ID: 578c6d77-2c21-4b66-be30-02dba68aa527 - Trace ID: 91e450d7-287c-44f9-bb82-650ada580f00
Error getting the secret: invalid_client: 7000222 - [2026-06-17 18:13:56Z]: 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: 07e28c7a-10ea-42e5-be38-d4e5aab50000 Correlation ID: b682c3ab-956f-44ea-8b1e-1456d9cc849f Timestamp: 2026-06-17 18:13:56Z - Correlation ID: b682c3ab-956f-44ea-8b1e-1456d9cc849f - Trace ID: 07e28c7a-10ea-42e5-be38-d4e5aab50000
Error getting the secret: invalid_client: 7000222 - [2026-06-17 18:13:56Z]: 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: aa67929e-3c49-4069-a68e-1d0743530100 Correlation ID: 157a52ad-1abe-40f4-98d7-92725cb6d030 Timestamp: 2026-06-17 18:13:56Z - Correlation ID: 157a52ad-1abe-40f4-98d7-92725cb6d030 - Trace ID: aa67929e-3c49-4069-a68e-1d0743530100
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)