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-04-27 16:56:24Z]: 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: fc8fbcc8-22b4-490c-acc9-2363ca924300 Correlation ID: 91d8c08d-e627-4303-8b21-bf2e05c827fc Timestamp: 2026-04-27 16:56:24Z - Correlation ID: 91d8c08d-e627-4303-8b21-bf2e05c827fc - Trace ID: fc8fbcc8-22b4-490c-acc9-2363ca924300
(node:3104) [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-04-27 16:56:24Z]: 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: 0f69dde5-151f-4ff1-b1bd-724ba2f83e00 Correlation ID: e87bb97a-2604-4673-9591-109c0addb26c Timestamp: 2026-04-27 16:56:24Z - Correlation ID: e87bb97a-2604-4673-9591-109c0addb26c - Trace ID: 0f69dde5-151f-4ff1-b1bd-724ba2f83e00
Error getting the secret: invalid_client: 7000222 - [2026-04-27 16:56:25Z]: 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: b7e29594-b9c7-4d64-940b-e22c96c34900 Correlation ID: bd23bdc0-ee63-424a-a005-0398908a0b5f Timestamp: 2026-04-27 16:56:25Z - Correlation ID: bd23bdc0-ee63-424a-a005-0398908a0b5f - Trace ID: b7e29594-b9c7-4d64-940b-e22c96c34900
Error getting the secret: invalid_client: 7000222 - [2026-04-27 16:56:25Z]: 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: d234e67e-eb44-453e-8468-4bebb47a7300 Correlation ID: e7a9e2ed-b881-4d64-abf5-2a53d2803d78 Timestamp: 2026-04-27 16:56:25Z - Correlation ID: e7a9e2ed-b881-4d64-abf5-2a53d2803d78 - Trace ID: d234e67e-eb44-453e-8468-4bebb47a7300
Error getting the secret: invalid_client: 7000222 - [2026-04-27 16:56:25Z]: 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: 48dbc3b8-50d1-4cd1-a1dd-49312ceb3f00 Correlation ID: 16875109-a44e-4967-be4d-bb2e353f06a6 Timestamp: 2026-04-27 16:56:25Z - Correlation ID: 16875109-a44e-4967-be4d-bb2e353f06a6 - Trace ID: 48dbc3b8-50d1-4cd1-a1dd-49312ceb3f00
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)