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-02 09:04:59Z]: 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: 27ec947b-c9a2-496d-9a80-d2dcb543a200 Correlation ID: 64315898-675c-4505-b93a-90a5e8c0292b Timestamp: 2026-12-02 09:04:59Z - Correlation ID: 64315898-675c-4505-b93a-90a5e8c0292b - Trace ID: 27ec947b-c9a2-496d-9a80-d2dcb543a200
(node:4812) [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-02 09:04:59Z]: 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: 5b2fab29-57db-42ce-a860-623c1d52a200 Correlation ID: d91cc04f-d31f-49f5-850a-59c756aa04c6 Timestamp: 2026-12-02 09:04:59Z - Correlation ID: d91cc04f-d31f-49f5-850a-59c756aa04c6 - Trace ID: 5b2fab29-57db-42ce-a860-623c1d52a200
Error getting the secret: invalid_client: 7000222 - [2026-12-02 09:04:59Z]: 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: 525f6098-bb4e-4fce-a041-006114aa9a00 Correlation ID: 220cc5b3-803d-4c89-a45a-e5626624986f Timestamp: 2026-12-02 09:04:59Z - Correlation ID: 220cc5b3-803d-4c89-a45a-e5626624986f - Trace ID: 525f6098-bb4e-4fce-a041-006114aa9a00
Error getting the secret: invalid_client: 7000222 - [2026-12-02 09:04:59Z]: 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: 304ec1ef-9328-4407-ad4f-e6ada9cda400 Correlation ID: a14f09cb-da63-40de-8f2e-37c409dd41fd Timestamp: 2026-12-02 09:04:59Z - Correlation ID: a14f09cb-da63-40de-8f2e-37c409dd41fd - Trace ID: 304ec1ef-9328-4407-ad4f-e6ada9cda400
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)