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-25 06:34:52Z]: 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: 241f5ed6-d3c6-4b2a-9456-a03a60052e00 Correlation ID: 4e1accce-e13e-4c97-a6be-a9c5cc3f6092 Timestamp: 2026-07-25 06:34:52Z - Correlation ID: 4e1accce-e13e-4c97-a6be-a9c5cc3f6092 - Trace ID: 241f5ed6-d3c6-4b2a-9456-a03a60052e00
(node:1788) [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-25 06:34:52Z]: 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: f40c576a-8c6c-4d89-8e6f-1dfc10814300 Correlation ID: 65e58a50-c8a2-4226-ac22-1425ee03ed79 Timestamp: 2026-07-25 06:34:52Z - Correlation ID: 65e58a50-c8a2-4226-ac22-1425ee03ed79 - Trace ID: f40c576a-8c6c-4d89-8e6f-1dfc10814300
Error getting the secret: invalid_client: 7000222 - [2026-07-25 06:34:52Z]: 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: d343d917-1482-4323-8b22-e10bccb94b00 Correlation ID: 233af791-ed31-425b-b456-bbe69eca5295 Timestamp: 2026-07-25 06:34:52Z - Correlation ID: 233af791-ed31-425b-b456-bbe69eca5295 - Trace ID: d343d917-1482-4323-8b22-e10bccb94b00
Error getting the secret: invalid_client: 7000222 - [2026-07-25 06:34:53Z]: 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: 241f5ed6-d3c6-4b2a-9456-a03a72052e00 Correlation ID: 7e8e19f6-8374-45e2-89a1-257ca2daad6a Timestamp: 2026-07-25 06:34:53Z - Correlation ID: 7e8e19f6-8374-45e2-89a1-257ca2daad6a - Trace ID: 241f5ed6-d3c6-4b2a-9456-a03a72052e00
Error getting the secret: invalid_client: 7000222 - [2026-07-25 06:34:53Z]: 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: 87129228-f6b8-4a8e-b289-9eb36a500300 Correlation ID: f2337cfc-59a0-43a1-97de-dea3361cb0a4 Timestamp: 2026-07-25 06:34:53Z - Correlation ID: f2337cfc-59a0-43a1-97de-dea3361cb0a4 - Trace ID: 87129228-f6b8-4a8e-b289-9eb36a500300
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)