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-06-18 06:58:44Z]: 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: 38c503dd-28bd-4136-a323-1e6320c70300 Correlation ID: 9daa24cc-b1fe-4b64-9dcf-f4d7b50b7c99 Timestamp: 2026-06-18 06:58:44Z - Correlation ID: 9daa24cc-b1fe-4b64-9dcf-f4d7b50b7c99 - Trace ID: 38c503dd-28bd-4136-a323-1e6320c70300
(node:5404) [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-06-18 06:58:44Z]: 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: 5bd0f579-38b0-42bd-a863-f74f743b0300 Correlation ID: b4db8c2e-cc85-4051-b26e-1de7c4babd96 Timestamp: 2026-06-18 06:58:44Z - Correlation ID: b4db8c2e-cc85-4051-b26e-1de7c4babd96 - Trace ID: 5bd0f579-38b0-42bd-a863-f74f743b0300
Error getting the secret: invalid_client: 7000222 - [2026-06-18 06:58:44Z]: 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: 64263993-32fb-4bfb-8657-314f76008300 Correlation ID: 09ed6d66-7830-41d0-a5ba-6d9665606258 Timestamp: 2026-06-18 06:58:44Z - Correlation ID: 09ed6d66-7830-41d0-a5ba-6d9665606258 - Trace ID: 64263993-32fb-4bfb-8657-314f76008300
Error getting the secret: invalid_client: 7000222 - [2026-06-18 06:58:44Z]: 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: ed01d78c-e471-4b8b-aa92-8ccc1e930300 Correlation ID: f2c6ba77-3994-47be-a16b-e3ebef961763 Timestamp: 2026-06-18 06:58:44Z - Correlation ID: f2c6ba77-3994-47be-a16b-e3ebef961763 - Trace ID: ed01d78c-e471-4b8b-aa92-8ccc1e930300
Error getting the secret: invalid_client: 7000222 - [2026-06-18 06:58:44Z]: 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: 96670b9e-5cbb-4d45-9807-9af8e48f2500 Correlation ID: 47e49527-3b7d-42b5-a4d2-e4bad60267a3 Timestamp: 2026-06-18 06:58:44Z - Correlation ID: 47e49527-3b7d-42b5-a4d2-e4bad60267a3 - Trace ID: 96670b9e-5cbb-4d45-9807-9af8e48f2500
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)