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 05:56:36Z]: 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: ef581e83-caf6-4404-a68d-efb72a2e3400 Correlation ID: 366163ff-c029-4d17-8ab0-d18970d90520 Timestamp: 2026-04-27 05:56:36Z - Correlation ID: 366163ff-c029-4d17-8ab0-d18970d90520 - Trace ID: ef581e83-caf6-4404-a68d-efb72a2e3400
(node:5660) [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 05:56:37Z]: 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: ff6de3c8-ea00-48bd-b91b-060b902a1900 Correlation ID: a9945fd1-0492-40d7-b454-b43c297f837e Timestamp: 2026-04-27 05:56:37Z - Correlation ID: a9945fd1-0492-40d7-b454-b43c297f837e - Trace ID: ff6de3c8-ea00-48bd-b91b-060b902a1900
Error getting the secret: invalid_client: 7000222 - [2026-04-27 05:56:37Z]: 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: ff6de3c8-ea00-48bd-b91b-060b932a1900 Correlation ID: 454bd15b-ef24-4fe6-a524-37eb3c95c2c4 Timestamp: 2026-04-27 05:56:37Z - Correlation ID: 454bd15b-ef24-4fe6-a524-37eb3c95c2c4 - Trace ID: ff6de3c8-ea00-48bd-b91b-060b932a1900
Error getting the secret: invalid_client: 7000222 - [2026-04-27 05:56:37Z]: 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: 0c3588c1-d446-4a1c-b2c1-d9815e4d6900 Correlation ID: 1aa44027-7e43-4a5a-9eb6-65dae48f6f96 Timestamp: 2026-04-27 05:56:37Z - Correlation ID: 1aa44027-7e43-4a5a-9eb6-65dae48f6f96 - Trace ID: 0c3588c1-d446-4a1c-b2c1-d9815e4d6900
Error getting the secret: invalid_client: 7000222 - [2026-04-27 05:56:38Z]: 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: 83790dcc-c4d8-4399-a69e-9e9d27ec3200 Correlation ID: 7de235be-fb89-42c6-bf09-d17291d95a31 Timestamp: 2026-04-27 05:56:38Z - Correlation ID: 7de235be-fb89-42c6-bf09-d17291d95a31 - Trace ID: 83790dcc-c4d8-4399-a69e-9e9d27ec3200
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)