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-17 15:42:17Z]: 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: 2964b4a5-6bef-4ee6-a59e-6387f2994800 Correlation ID: 0aea4883-2b2e-446c-937f-a23122bc8773 Timestamp: 2026-07-17 15:42:17Z - Correlation ID: 0aea4883-2b2e-446c-937f-a23122bc8773 - Trace ID: 2964b4a5-6bef-4ee6-a59e-6387f2994800
(node:6064) [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-17 15:42: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: 2e4b4534-f23a-4db0-b2cb-7481a2e25600 Correlation ID: 0bce4cb1-dff5-4b9c-bf90-c9e0d5f0dd8f Timestamp: 2026-07-17 15:42:18Z - Correlation ID: 0bce4cb1-dff5-4b9c-bf90-c9e0d5f0dd8f - Trace ID: 2e4b4534-f23a-4db0-b2cb-7481a2e25600
Error getting the secret: invalid_client: 7000222 - [2026-07-17 15:42: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: ca16491b-6024-4066-bbae-a7cdd6b52300 Correlation ID: 4901557e-859f-4baa-bae5-3f584416cfac Timestamp: 2026-07-17 15:42:18Z - Correlation ID: 4901557e-859f-4baa-bae5-3f584416cfac - Trace ID: ca16491b-6024-4066-bbae-a7cdd6b52300
Error getting the secret: invalid_client: 7000222 - [2026-07-17 15:42:19Z]: 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: d441f332-87e5-424d-9ff3-b88cc9f83e00 Correlation ID: 42bff31f-9f56-4b16-b1e1-95323b15cbac Timestamp: 2026-07-17 15:42:19Z - Correlation ID: 42bff31f-9f56-4b16-b1e1-95323b15cbac - Trace ID: d441f332-87e5-424d-9ff3-b88cc9f83e00
Error getting the secret: invalid_client: 7000222 - [2026-07-17 15:42:19Z]: 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: ae2ac52f-5eda-4442-8114-0bd9334d4b00 Correlation ID: fdf7f7fc-ebdb-491f-b9a5-dae06a88d1a6 Timestamp: 2026-07-17 15:42:19Z - Correlation ID: fdf7f7fc-ebdb-491f-b9a5-dae06a88d1a6 - Trace ID: ae2ac52f-5eda-4442-8114-0bd9334d4b00
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)