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-10-03 05:24:27Z]: 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: 14a0b5dc-8849-4961-bd0f-883fd5a73800 Correlation ID: b6d9d00d-a3fb-49c8-905d-10420f00ddbf Timestamp: 2026-10-03 05:24:27Z - Correlation ID: b6d9d00d-a3fb-49c8-905d-10420f00ddbf - Trace ID: 14a0b5dc-8849-4961-bd0f-883fd5a73800
(node:1936) [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-10-03 05:24:27Z]: 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: 7c51dfd2-97e0-4c09-84b8-9ef0d3667b00 Correlation ID: aea232c9-3238-4bae-8929-80fb016533e0 Timestamp: 2026-10-03 05:24:27Z - Correlation ID: aea232c9-3238-4bae-8929-80fb016533e0 - Trace ID: 7c51dfd2-97e0-4c09-84b8-9ef0d3667b00
Error getting the secret: invalid_client: 7000222 - [2026-10-03 05:24:27Z]: 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: b8c84c8e-e393-4b47-a0df-64d9f8182200 Correlation ID: 4a87c439-bf1e-4e18-ad52-14ef62d3c56a Timestamp: 2026-10-03 05:24:27Z - Correlation ID: 4a87c439-bf1e-4e18-ad52-14ef62d3c56a - Trace ID: b8c84c8e-e393-4b47-a0df-64d9f8182200
Error getting the secret: invalid_client: 7000222 - [2026-10-03 05:24:28Z]: 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: 7c51dfd2-97e0-4c09-84b8-9ef0e0667b00 Correlation ID: ed281741-9b8e-484a-816c-ab4a5d1367cd Timestamp: 2026-10-03 05:24:28Z - Correlation ID: ed281741-9b8e-484a-816c-ab4a5d1367cd - Trace ID: 7c51dfd2-97e0-4c09-84b8-9ef0e0667b00
Error getting the secret: invalid_client: 7000222 - [2026-10-03 05:24:28Z]: 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: 25cfcd7c-b004-4234-8df0-70c31e3dcf00 Correlation ID: 4ae207b1-e859-478d-81ff-c50bd742cd21 Timestamp: 2026-10-03 05:24:28Z - Correlation ID: 4ae207b1-e859-478d-81ff-c50bd742cd21 - Trace ID: 25cfcd7c-b004-4234-8df0-70c31e3dcf00
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)