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-05 02:22:03Z]: 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: fef02886-2c4b-41fa-80c7-cc75db8ec200 Correlation ID: 48434970-91bd-4e90-a3f0-be7eb82df367 Timestamp: 2026-10-05 02:22:03Z - Correlation ID: 48434970-91bd-4e90-a3f0-be7eb82df367 - Trace ID: fef02886-2c4b-41fa-80c7-cc75db8ec200
(node:892) [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-05 02:22:03Z]: 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: a41a6142-77d0-4750-830c-946f1886cf00 Correlation ID: e0f57822-e577-4dba-8a76-ec0fb24496f9 Timestamp: 2026-10-05 02:22:03Z - Correlation ID: e0f57822-e577-4dba-8a76-ec0fb24496f9 - Trace ID: a41a6142-77d0-4750-830c-946f1886cf00
Error getting the secret: invalid_client: 7000222 - [2026-10-05 02:22:04Z]: 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: a41a6142-77d0-4750-830c-946f2886cf00 Correlation ID: 18af62bb-a1b7-4a39-84fb-f1aa862fc6ff Timestamp: 2026-10-05 02:22:04Z - Correlation ID: 18af62bb-a1b7-4a39-84fb-f1aa862fc6ff - Trace ID: a41a6142-77d0-4750-830c-946f2886cf00
Error getting the secret: invalid_client: 7000222 - [2026-10-05 02:22:04Z]: 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: 7eb71e2a-a509-465a-a283-fda52ca62501 Correlation ID: f64483af-d41d-4961-a385-81b7b5b33449 Timestamp: 2026-10-05 02:22:04Z - Correlation ID: f64483af-d41d-4961-a385-81b7b5b33449 - Trace ID: 7eb71e2a-a509-465a-a283-fda52ca62501
Error getting the secret: invalid_client: 7000222 - [2026-10-05 02:22:04Z]: 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: 7eb71e2a-a509-465a-a283-fda539a62501 Correlation ID: f20dd08f-ca33-481f-a89f-91e8926299d8 Timestamp: 2026-10-05 02:22:04Z - Correlation ID: f20dd08f-ca33-481f-a89f-91e8926299d8 - Trace ID: 7eb71e2a-a509-465a-a283-fda539a62501
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)