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-13 14:18:13Z]: 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: 9d0b9e48-906a-4bce-9a6b-3bc346f30b00 Correlation ID: da289adb-6217-4951-8577-78e0bb93de05 Timestamp: 2026-07-13 14:18:13Z - Correlation ID: da289adb-6217-4951-8577-78e0bb93de05 - Trace ID: 9d0b9e48-906a-4bce-9a6b-3bc346f30b00
(node:3996) [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-13 14:18:14Z]: 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: 9622e43a-e1a9-4e0a-8839-e8d26f9d2200 Correlation ID: 4a69bb8d-a635-495f-b2cb-e2907c502d58 Timestamp: 2026-07-13 14:18:14Z - Correlation ID: 4a69bb8d-a635-495f-b2cb-e2907c502d58 - Trace ID: 9622e43a-e1a9-4e0a-8839-e8d26f9d2200
Error getting the secret: invalid_client: 7000222 - [2026-07-13 14:18:14Z]: 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: 06ad5fee-fdf6-4de0-9b08-65a3d6f81d00 Correlation ID: 6f13036a-2a33-4823-ad23-b3080e0fa893 Timestamp: 2026-07-13 14:18:14Z - Correlation ID: 6f13036a-2a33-4823-ad23-b3080e0fa893 - Trace ID: 06ad5fee-fdf6-4de0-9b08-65a3d6f81d00
Error getting the secret: invalid_client: 7000222 - [2026-07-13 14:18:14Z]: 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: fca9a5ad-2bc9-4a2f-9db5-6e13e8ac2100 Correlation ID: e5eae843-93b3-4d6f-a3ff-e6dcf39c97bb Timestamp: 2026-07-13 14:18:14Z - Correlation ID: e5eae843-93b3-4d6f-a3ff-e6dcf39c97bb - Trace ID: fca9a5ad-2bc9-4a2f-9db5-6e13e8ac2100
Error getting the secret: invalid_client: 7000222 - [2026-07-13 14:18:14Z]: 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: d659205a-8658-4f04-9813-e0f0f69e1f00 Correlation ID: 8f2b4d82-cd5f-4f72-ba95-26ac21b1f2cc Timestamp: 2026-07-13 14:18:14Z - Correlation ID: 8f2b4d82-cd5f-4f72-ba95-26ac21b1f2cc - Trace ID: d659205a-8658-4f04-9813-e0f0f69e1f00
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)