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 17:21:35Z]: 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: 15628b83-fa96-481b-aed4-6014e9281c00 Correlation ID: bc4b84f0-a7e9-4051-9d7e-5eb511b5d438 Timestamp: 2026-07-05 17:21:35Z - Correlation ID: bc4b84f0-a7e9-4051-9d7e-5eb511b5d438 - Trace ID: 15628b83-fa96-481b-aed4-6014e9281c00
(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-07-05 17:21:35Z]: 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: 518efbe1-c7ec-4c52-997c-fcfbd56f1a00 Correlation ID: 62bf804d-a2f3-4f8a-8f5e-16dec7687539 Timestamp: 2026-07-05 17:21:35Z - Correlation ID: 62bf804d-a2f3-4f8a-8f5e-16dec7687539 - Trace ID: 518efbe1-c7ec-4c52-997c-fcfbd56f1a00
Error getting the secret: invalid_client: 7000222 - [2026-07-05 17:21:35Z]: 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: 751c98d9-77f9-45bf-ab79-5cc58f541a00 Correlation ID: a926f2d0-4d36-4174-ae5c-e403ec532652 Timestamp: 2026-07-05 17:21:35Z - Correlation ID: a926f2d0-4d36-4174-ae5c-e403ec532652 - Trace ID: 751c98d9-77f9-45bf-ab79-5cc58f541a00
Error getting the secret: invalid_client: 7000222 - [2026-07-05 17:21:36Z]: 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: 9e8c477e-3cdb-421b-8612-4b6d71581f00 Correlation ID: ac376d0b-d78b-417c-a22b-65de77c6f325 Timestamp: 2026-07-05 17:21:36Z - Correlation ID: ac376d0b-d78b-417c-a22b-65de77c6f325 - Trace ID: 9e8c477e-3cdb-421b-8612-4b6d71581f00
Error getting the secret: invalid_client: 7000222 - [2026-07-05 17:21:36Z]: 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: 3d27b5ce-f84a-482b-a880-ec797f3c2d00 Correlation ID: b8b87137-a179-41b1-a954-ac0899014188 Timestamp: 2026-07-05 17:21:36Z - Correlation ID: b8b87137-a179-41b1-a954-ac0899014188 - Trace ID: 3d27b5ce-f84a-482b-a880-ec797f3c2d00
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)