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-02-27 17:35:57Z]: 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: 85d73a1d-60e6-4cc7-b397-9d7c6fcd2000 Correlation ID: 32c5ba80-c1f0-43b0-92ef-4eb23b6b71df Timestamp: 2026-02-27 17:35:57Z - Correlation ID: 32c5ba80-c1f0-43b0-92ef-4eb23b6b71df - Trace ID: 85d73a1d-60e6-4cc7-b397-9d7c6fcd2000
(node:1932) [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-02-27 17:35:57Z]: 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: 24a827e0-34a8-4d41-aacf-64bf9be62700 Correlation ID: d405091e-ca29-48ce-be6d-940766225713 Timestamp: 2026-02-27 17:35:57Z - Correlation ID: d405091e-ca29-48ce-be6d-940766225713 - Trace ID: 24a827e0-34a8-4d41-aacf-64bf9be62700
Error getting the secret: invalid_client: 7000222 - [2026-02-27 17:35:58Z]: 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: f7807cfa-9580-454e-a8e5-ef5c195c2700 Correlation ID: f97e7116-0a7a-4ece-88bb-e1739ac71f01 Timestamp: 2026-02-27 17:35:58Z - Correlation ID: f97e7116-0a7a-4ece-88bb-e1739ac71f01 - Trace ID: f7807cfa-9580-454e-a8e5-ef5c195c2700
Error getting the secret: invalid_client: 7000222 - [2026-02-27 17:35:58Z]: 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: f1603d22-9b65-4fe7-97e3-ba7e6b3f2600 Correlation ID: 5ad4dcd0-028e-4260-a78b-8362b5b718ae Timestamp: 2026-02-27 17:35:58Z - Correlation ID: 5ad4dcd0-028e-4260-a78b-8362b5b718ae - Trace ID: f1603d22-9b65-4fe7-97e3-ba7e6b3f2600
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:25:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)