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-04-20 20:20:08Z]: 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: c0b4e49b-a0b2-404e-abdc-9a5d830c1b00 Correlation ID: bd6cb282-a996-43d5-bee4-99c3d7084276 Timestamp: 2026-04-20 20:20:08Z - Correlation ID: bd6cb282-a996-43d5-bee4-99c3d7084276 - Trace ID: c0b4e49b-a0b2-404e-abdc-9a5d830c1b00
(node:5260) [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-04-20 20:20:09Z]: 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: a6ede073-c541-4cf2-b982-17bcabf91600 Correlation ID: 8c1ab9b2-86c1-4b2e-9610-19a37bbf8592 Timestamp: 2026-04-20 20:20:09Z - Correlation ID: 8c1ab9b2-86c1-4b2e-9610-19a37bbf8592 - Trace ID: a6ede073-c541-4cf2-b982-17bcabf91600
Error getting the secret: invalid_client: 7000222 - [2026-04-20 20:20:09Z]: 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: a6ede073-c541-4cf2-b982-17bcb4f91600 Correlation ID: 71f6acf9-8f2d-4c35-9552-fd9eb4429419 Timestamp: 2026-04-20 20:20:09Z - Correlation ID: 71f6acf9-8f2d-4c35-9552-fd9eb4429419 - Trace ID: a6ede073-c541-4cf2-b982-17bcb4f91600
Error getting the secret: invalid_client: 7000222 - [2026-04-20 20:20:10Z]: 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: 6e32bc22-07c1-438e-97bc-e316cde21b00 Correlation ID: 0e3f097d-9e90-404c-af4b-5508c61547a0 Timestamp: 2026-04-20 20:20:10Z - Correlation ID: 0e3f097d-9e90-404c-af4b-5508c61547a0 - Trace ID: 6e32bc22-07c1-438e-97bc-e316cde21b00
Error getting the secret: invalid_client: 7000222 - [2026-04-20 20:20:10Z]: 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: d6d57e2a-9fcc-4bdd-80e2-0dafc4811a00 Correlation ID: 0ef6605f-6ad9-43e4-8503-5d65a53ccb91 Timestamp: 2026-04-20 20:20:10Z - Correlation ID: 0ef6605f-6ad9-43e4-8503-5d65a53ccb91 - Trace ID: d6d57e2a-9fcc-4bdd-80e2-0dafc4811a00
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)