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-04 07:24:09Z]: 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: 4a361e6b-6c2a-4062-8823-3c7e8fb00600 Correlation ID: 3824140e-e68d-42b0-9b55-ac43ee26d6dd Timestamp: 2026-07-04 07:24:09Z - Correlation ID: 3824140e-e68d-42b0-9b55-ac43ee26d6dd - Trace ID: 4a361e6b-6c2a-4062-8823-3c7e8fb00600
(node:5812) [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-04 07:24:10Z]: 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: f06e5fc6-48f4-485f-819a-21cbac580300 Correlation ID: 248e001e-dcad-4257-ab64-dd6ed4e948c0 Timestamp: 2026-07-04 07:24:10Z - Correlation ID: 248e001e-dcad-4257-ab64-dd6ed4e948c0 - Trace ID: f06e5fc6-48f4-485f-819a-21cbac580300
Error getting the secret: invalid_client: 7000222 - [2026-07-04 07:24:10Z]: 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: 4f50696c-a296-4820-a399-75587d550700 Correlation ID: 7ff7ca84-4121-4e10-94eb-8f9e13016028 Timestamp: 2026-07-04 07:24:10Z - Correlation ID: 7ff7ca84-4121-4e10-94eb-8f9e13016028 - Trace ID: 4f50696c-a296-4820-a399-75587d550700
Error getting the secret: invalid_client: 7000222 - [2026-07-04 07:24:10Z]: 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: 6e849820-44e7-4716-954c-0aab356a0600 Correlation ID: ba99f011-b6a5-4383-bc23-d67142a5d7cf Timestamp: 2026-07-04 07:24:10Z - Correlation ID: ba99f011-b6a5-4383-bc23-d67142a5d7cf - Trace ID: 6e849820-44e7-4716-954c-0aab356a0600
Error getting the secret: invalid_client: 7000222 - [2026-07-04 07:24:11Z]: 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: 238d928e-4263-4322-81ce-6552fa890300 Correlation ID: 46572213-3c3e-4a21-a9ed-b37af8f95555 Timestamp: 2026-07-04 07:24:11Z - Correlation ID: 46572213-3c3e-4a21-a9ed-b37af8f95555 - Trace ID: 238d928e-4263-4322-81ce-6552fa890300
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)