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-12-03 13:17:49Z]: 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: e6a388ae-f694-4eaa-8948-efc9b8d0d300 Correlation ID: 8be62eb1-1f6e-4fea-9284-bbcad924c03e Timestamp: 2026-12-03 13:17:49Z - Correlation ID: 8be62eb1-1f6e-4fea-9284-bbcad924c03e - Trace ID: e6a388ae-f694-4eaa-8948-efc9b8d0d300
(node:1628) [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-12-03 13:17:49Z]: 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: 46031bbd-0024-409d-b9d2-20de0cb0ec00 Correlation ID: 005d74d4-ba82-4175-bf03-6d387015e1ce Timestamp: 2026-12-03 13:17:49Z - Correlation ID: 005d74d4-ba82-4175-bf03-6d387015e1ce - Trace ID: 46031bbd-0024-409d-b9d2-20de0cb0ec00
Error getting the secret: invalid_client: 7000222 - [2026-12-03 13:17:49Z]: 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: 717f25a8-0e38-431a-acbb-e67e54f86c00 Correlation ID: ed5dd5e7-7caf-462e-8cfb-480dd45a4c88 Timestamp: 2026-12-03 13:17:49Z - Correlation ID: ed5dd5e7-7caf-462e-8cfb-480dd45a4c88 - Trace ID: 717f25a8-0e38-431a-acbb-e67e54f86c00
Error getting the secret: invalid_client: 7000222 - [2026-12-03 13:17:50Z]: 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: 210fb98b-effe-446d-b711-6f58aa36e300 Correlation ID: bc9a0855-1a4c-45bf-845b-d4f58da08545 Timestamp: 2026-12-03 13:17:50Z - Correlation ID: bc9a0855-1a4c-45bf-845b-d4f58da08545 - Trace ID: 210fb98b-effe-446d-b711-6f58aa36e300
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:25:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)