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-02-27 11:24:15Z]: 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: 56e7560d-8677-4af5-a7de-ce946c803a00 Correlation ID: b3c7caf0-a543-4037-9d59-76676c38e82f Timestamp: 2026-02-27 11:24:15Z - Correlation ID: b3c7caf0-a543-4037-9d59-76676c38e82f - Trace ID: 56e7560d-8677-4af5-a7de-ce946c803a00
(node:3380) [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-02-27 11:24:15Z]: 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: 85bc2536-9006-46ff-8d73-7006db993800 Correlation ID: 4289a6bd-06aa-412d-9873-174c7c76962f Timestamp: 2026-02-27 11:24:15Z - Correlation ID: 4289a6bd-06aa-412d-9873-174c7c76962f - Trace ID: 85bc2536-9006-46ff-8d73-7006db993800
Error getting the secret: invalid_client: 7000222 - [2026-02-27 11:24:16Z]: 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: ec411056-fdab-442b-aae9-b2a74f711800 Correlation ID: 8848c88a-d257-4909-adf6-9435b7d07258 Timestamp: 2026-02-27 11:24:16Z - Correlation ID: 8848c88a-d257-4909-adf6-9435b7d07258 - Trace ID: ec411056-fdab-442b-aae9-b2a74f711800
Error getting the secret: invalid_client: 7000222 - [2026-02-27 11:24:16Z]: 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: 257672fd-d5ba-4e20-9614-f6de168f1e00 Correlation ID: ad1143c9-eb1f-4356-8d7a-0aef85d4af66 Timestamp: 2026-02-27 11:24:16Z - Correlation ID: ad1143c9-eb1f-4356-8d7a-0aef85d4af66 - Trace ID: 257672fd-d5ba-4e20-9614-f6de168f1e00
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)