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-05 01:37:19Z]: 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: 6e0a129f-9c14-4a4b-b71d-787758a11200 Correlation ID: f673791e-6b99-4e7e-a3ee-310c92dad029 Timestamp: 2026-07-05 01:37:19Z - Correlation ID: f673791e-6b99-4e7e-a3ee-310c92dad029 - Trace ID: 6e0a129f-9c14-4a4b-b71d-787758a11200
(node:1304) [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-05 01:37:20Z]: 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: 056f2b70-1676-435b-b470-324da5301400 Correlation ID: 3d1c682f-0afa-44e1-8934-4716a71040a2 Timestamp: 2026-07-05 01:37:20Z - Correlation ID: 3d1c682f-0afa-44e1-8934-4716a71040a2 - Trace ID: 056f2b70-1676-435b-b470-324da5301400
Error getting the secret: invalid_client: 7000222 - [2026-07-05 01:37:20Z]: 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: bd51e04f-91b0-4617-865f-90608cf01100 Correlation ID: bc8347c4-54ae-4d84-b7de-cc9e1128e808 Timestamp: 2026-07-05 01:37:20Z - Correlation ID: bc8347c4-54ae-4d84-b7de-cc9e1128e808 - Trace ID: bd51e04f-91b0-4617-865f-90608cf01100
Error getting the secret: invalid_client: 7000222 - [2026-07-05 01:37:20Z]: 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: bd51e04f-91b0-4617-865f-906092f01100 Correlation ID: c578be3d-5a3a-4fa9-b48b-c9c58a3ac30e Timestamp: 2026-07-05 01:37:20Z - Correlation ID: c578be3d-5a3a-4fa9-b48b-c9c58a3ac30e - Trace ID: bd51e04f-91b0-4617-865f-906092f01100
Error getting the secret: invalid_client: 7000222 - [2026-07-05 01:37:21Z]: 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: 2520850d-ad5e-44f4-997d-4484067e1500 Correlation ID: 8a0802ae-45f9-400a-a0a1-6c127a6636dc Timestamp: 2026-07-05 01:37:21Z - Correlation ID: 8a0802ae-45f9-400a-a0a1-6c127a6636dc - Trace ID: 2520850d-ad5e-44f4-997d-4484067e1500
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)