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-06-18 11:48:29Z]: 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: b727f4f0-9f73-447b-9c27-3799cd142800 Correlation ID: 3d899d4d-cc70-45f9-aa7d-21299cd814dd Timestamp: 2026-06-18 11:48:29Z - Correlation ID: 3d899d4d-cc70-45f9-aa7d-21299cd814dd - Trace ID: b727f4f0-9f73-447b-9c27-3799cd142800
(node:3360) [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-06-18 11:48:29Z]: 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: 311546c4-25d7-4e0a-9955-cf8561bd2800 Correlation ID: b8658267-bc26-4adf-b7cf-197ce9d8ef50 Timestamp: 2026-06-18 11:48:29Z - Correlation ID: b8658267-bc26-4adf-b7cf-197ce9d8ef50 - Trace ID: 311546c4-25d7-4e0a-9955-cf8561bd2800
Error getting the secret: invalid_client: 7000222 - [2026-06-18 11:48:29Z]: 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: d534591c-590a-4685-b527-35102bc00300 Correlation ID: 992b9e77-9cf1-430a-8086-240ea993e927 Timestamp: 2026-06-18 11:48:29Z - Correlation ID: 992b9e77-9cf1-430a-8086-240ea993e927 - Trace ID: d534591c-590a-4685-b527-35102bc00300
Error getting the secret: invalid_client: 7000222 - [2026-06-18 11:48:29Z]: 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: fab6ea10-d5f9-45bb-b5fb-efda1db77700 Correlation ID: 8e22ec31-bff4-4fe2-ba99-d5051f4e2b74 Timestamp: 2026-06-18 11:48:29Z - Correlation ID: 8e22ec31-bff4-4fe2-ba99-d5051f4e2b74 - Trace ID: fab6ea10-d5f9-45bb-b5fb-efda1db77700
Error getting the secret: invalid_client: 7000222 - [2026-06-18 11:48:30Z]: 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: f194d64c-4e98-4de1-baf0-71fa1d548600 Correlation ID: 5affcecb-1b7a-4ff1-8f3a-0ede7a6ed7ba Timestamp: 2026-06-18 11:48:30Z - Correlation ID: 5affcecb-1b7a-4ff1-8f3a-0ede7a6ed7ba - Trace ID: f194d64c-4e98-4de1-baf0-71fa1d548600
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)