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-02 15:40: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: 3598f954-b54f-41e2-98d1-acb53c091100 Correlation ID: 86d48a6f-3a28-4423-aa2e-ab6124ae45ab Timestamp: 2026-07-02 15:40:10Z - Correlation ID: 86d48a6f-3a28-4423-aa2e-ab6124ae45ab - Trace ID: 3598f954-b54f-41e2-98d1-acb53c091100
(node:1776) [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-02 15:40: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: 54eaebaa-3c37-40bb-a3e3-c59cdd671400 Correlation ID: 323dd2b1-f1b6-494b-961f-1acec41d54d4 Timestamp: 2026-07-02 15:40:10Z - Correlation ID: 323dd2b1-f1b6-494b-961f-1acec41d54d4 - Trace ID: 54eaebaa-3c37-40bb-a3e3-c59cdd671400
Error getting the secret: invalid_client: 7000222 - [2026-07-02 15:40:11Z]: 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: 51458336-e1cd-44e3-acf5-25d2bc393b00 Correlation ID: 72b7cdee-7b56-4cba-a425-5abe6c77d776 Timestamp: 2026-07-02 15:40:11Z - Correlation ID: 72b7cdee-7b56-4cba-a425-5abe6c77d776 - Trace ID: 51458336-e1cd-44e3-acf5-25d2bc393b00
Error getting the secret: invalid_client: 7000222 - [2026-07-02 15:40:11Z]: 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: 79b7feb7-d655-4dfd-b8f9-301301042100 Correlation ID: 1c8faf38-3c61-4e0e-85af-78b356461133 Timestamp: 2026-07-02 15:40:11Z - Correlation ID: 1c8faf38-3c61-4e0e-85af-78b356461133 - Trace ID: 79b7feb7-d655-4dfd-b8f9-301301042100
Error getting the secret: invalid_client: 7000222 - [2026-07-02 15:40:11Z]: 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: 502f3b15-f763-430e-9749-70f844e10a00 Correlation ID: 76a9a029-1718-4276-aefb-2b5289b2a71d Timestamp: 2026-07-02 15:40:11Z - Correlation ID: 76a9a029-1718-4276-aefb-2b5289b2a71d - Trace ID: 502f3b15-f763-430e-9749-70f844e10a00
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)