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-10 03:32:57Z]: 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: dd5191c8-7d07-4ecf-8c21-de1e428c3700 Correlation ID: fb381bf8-ec27-4011-8d38-7fad44280d83 Timestamp: 2026-07-10 03:32:57Z - Correlation ID: fb381bf8-ec27-4011-8d38-7fad44280d83 - Trace ID: dd5191c8-7d07-4ecf-8c21-de1e428c3700
(node:2032) [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-10 03:32:57Z]: 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: 6b311173-2b40-4d7c-843b-754fda019b00 Correlation ID: 29b3e3d7-b32a-42e8-8493-4b4bb7e1823c Timestamp: 2026-07-10 03:32:57Z - Correlation ID: 29b3e3d7-b32a-42e8-8493-4b4bb7e1823c - Trace ID: 6b311173-2b40-4d7c-843b-754fda019b00
Error getting the secret: invalid_client: 7000222 - [2026-07-10 03:32:57Z]: 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: 6de22cb1-5a92-4bc1-ada2-a79ac8152100 Correlation ID: 6cb935ea-aa6e-4b60-8d08-86e2310b4f5e Timestamp: 2026-07-10 03:32:57Z - Correlation ID: 6cb935ea-aa6e-4b60-8d08-86e2310b4f5e - Trace ID: 6de22cb1-5a92-4bc1-ada2-a79ac8152100
Error getting the secret: invalid_client: 7000222 - [2026-07-10 03:32:58Z]: 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: 006e0434-7541-463d-ae10-64d01c2b8d00 Correlation ID: d7e7c6c3-a762-4db2-83fb-a61abf6762b0 Timestamp: 2026-07-10 03:32:58Z - Correlation ID: d7e7c6c3-a762-4db2-83fb-a61abf6762b0 - Trace ID: 006e0434-7541-463d-ae10-64d01c2b8d00
Error getting the secret: invalid_client: 7000222 - [2026-07-10 03:32:58Z]: 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: 4635dc57-e5f3-46a7-b0fc-8610eb741d00 Correlation ID: 04031c6b-37f1-4a24-bb78-4f8d03e10482 Timestamp: 2026-07-10 03:32:58Z - Correlation ID: 04031c6b-37f1-4a24-bb78-4f8d03e10482 - Trace ID: 4635dc57-e5f3-46a7-b0fc-8610eb741d00
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)