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-07-20 13:25: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: a0189f42-4402-45e8-8718-131312662f00 Correlation ID: af2e94fc-f423-4e12-9031-fde15a3c3fc8 Timestamp: 2026-07-20 13:25:50Z - Correlation ID: af2e94fc-f423-4e12-9031-fde15a3c3fc8 - Trace ID: a0189f42-4402-45e8-8718-131312662f00
(node:3472) [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-07-20 13:25: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: eb8fb5b0-6cb6-4d49-824d-5001fd5a0c00 Correlation ID: 0a3e8dae-7ace-436f-b40f-0c81c299acbc Timestamp: 2026-07-20 13:25:50Z - Correlation ID: 0a3e8dae-7ace-436f-b40f-0c81c299acbc - Trace ID: eb8fb5b0-6cb6-4d49-824d-5001fd5a0c00
Error getting the secret: invalid_client: 7000222 - [2026-07-20 13:25:51Z]: 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: 1502740d-beab-4483-b333-6d9a02542700 Correlation ID: 031f7b41-1758-4731-b3c1-748244bfdcf1 Timestamp: 2026-07-20 13:25:51Z - Correlation ID: 031f7b41-1758-4731-b3c1-748244bfdcf1 - Trace ID: 1502740d-beab-4483-b333-6d9a02542700
Error getting the secret: invalid_client: 7000222 - [2026-07-20 13:25:51Z]: 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: a3596b00-23ef-4ed7-a040-6dbb08b72800 Correlation ID: 918c693e-18ae-4070-b6a4-b8b1949a585c Timestamp: 2026-07-20 13:25:51Z - Correlation ID: 918c693e-18ae-4070-b6a4-b8b1949a585c - Trace ID: a3596b00-23ef-4ed7-a040-6dbb08b72800
Error getting the secret: invalid_client: 7000222 - [2026-07-20 13:25:51Z]: 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: 1502740d-beab-4483-b333-6d9a11542700 Correlation ID: 190fb60a-2f6b-4dce-8df9-9cd2dce4e681 Timestamp: 2026-07-20 13:25:51Z - Correlation ID: 190fb60a-2f6b-4dce-8df9-9cd2dce4e681 - Trace ID: 1502740d-beab-4483-b333-6d9a11542700
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)