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-23 14:33:18Z]: 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: 20666025-05f4-4add-af63-9a34b0e46000 Correlation ID: fbbc4b7b-e1a2-42d8-872d-01879f3505af Timestamp: 2026-07-23 14:33:18Z - Correlation ID: fbbc4b7b-e1a2-42d8-872d-01879f3505af - Trace ID: 20666025-05f4-4add-af63-9a34b0e46000
(node:4444) [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-23 14:33:18Z]: 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: 957a4f78-be8b-4bd5-96a8-520fc7e35c00 Correlation ID: 5b818809-7305-42eb-b28b-17ec0d682941 Timestamp: 2026-07-23 14:33:18Z - Correlation ID: 5b818809-7305-42eb-b28b-17ec0d682941 - Trace ID: 957a4f78-be8b-4bd5-96a8-520fc7e35c00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 14:33:18Z]: 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: 20666025-05f4-4add-af63-9a34bde46000 Correlation ID: 34533b43-43d5-4762-aa5c-0a2cf6d06c7e Timestamp: 2026-07-23 14:33:18Z - Correlation ID: 34533b43-43d5-4762-aa5c-0a2cf6d06c7e - Trace ID: 20666025-05f4-4add-af63-9a34bde46000
Error getting the secret: invalid_client: 7000222 - [2026-07-23 14:33:18Z]: 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: 2f4cc6e4-f834-4ceb-af8e-e9c505e51b00 Correlation ID: cba27de0-8b53-4669-a3ce-f7f928b965f6 Timestamp: 2026-07-23 14:33:18Z - Correlation ID: cba27de0-8b53-4669-a3ce-f7f928b965f6 - Trace ID: 2f4cc6e4-f834-4ceb-af8e-e9c505e51b00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 14:33:18Z]: 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: 5445c553-24ca-4ea0-b1fa-dc21edd50800 Correlation ID: ae7e3d86-84af-4f6c-aab6-13a96c0750b6 Timestamp: 2026-07-23 14:33:18Z - Correlation ID: ae7e3d86-84af-4f6c-aab6-13a96c0750b6 - Trace ID: 5445c553-24ca-4ea0-b1fa-dc21edd50800
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)