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 05:08:20Z]: 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: ab4638ce-8e08-4fc6-969a-635655e21b00 Correlation ID: 87e401c6-d0da-47ef-b546-9389a1b081bb Timestamp: 2026-02-27 05:08:20Z - Correlation ID: 87e401c6-d0da-47ef-b546-9389a1b081bb - Trace ID: ab4638ce-8e08-4fc6-969a-635655e21b00
(node:3272) [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 05:08:20Z]: 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: d4b03643-e299-4950-9ef8-112bb2ba2f00 Correlation ID: 29e50cb8-c50e-4af7-8ba2-0a50004be3c2 Timestamp: 2026-02-27 05:08:20Z - Correlation ID: 29e50cb8-c50e-4af7-8ba2-0a50004be3c2 - Trace ID: d4b03643-e299-4950-9ef8-112bb2ba2f00
Error getting the secret: invalid_client: 7000222 - [2026-02-27 05:08:20Z]: 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: eb9d3ac2-9d0d-4bab-b479-234616581000 Correlation ID: 23027d97-aa92-4fd1-8097-d84a185762ae Timestamp: 2026-02-27 05:08:20Z - Correlation ID: 23027d97-aa92-4fd1-8097-d84a185762ae - Trace ID: eb9d3ac2-9d0d-4bab-b479-234616581000
Error getting the secret: invalid_client: 7000222 - [2026-02-27 05:08:20Z]: 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: d1eecf96-a0ce-4761-a48c-c92f97861500 Correlation ID: 3b8857b6-f34e-4005-b473-4dc22d76f7a7 Timestamp: 2026-02-27 05:08:20Z - Correlation ID: 3b8857b6-f34e-4005-b473-4dc22d76f7a7 - Trace ID: d1eecf96-a0ce-4761-a48c-c92f97861500
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)