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-12 16:59:21Z]: 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: 53b93871-fca7-4ae6-a072-f62bba609700 Correlation ID: 92f5a33a-49eb-4378-9bb9-09d403a58eb8 Timestamp: 2026-06-12 16:59:21Z - Correlation ID: 92f5a33a-49eb-4378-9bb9-09d403a58eb8 - Trace ID: 53b93871-fca7-4ae6-a072-f62bba609700
(node:2824) [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-12 16:59:21Z]: 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: 2c8c6926-27f3-4c05-862f-2fdefdac3700 Correlation ID: 90806979-ca0b-4038-9881-e5b2956e41ba Timestamp: 2026-06-12 16:59:21Z - Correlation ID: 90806979-ca0b-4038-9881-e5b2956e41ba - Trace ID: 2c8c6926-27f3-4c05-862f-2fdefdac3700
Error getting the secret: invalid_client: 7000222 - [2026-06-12 16:59:22Z]: 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: 3b40ea7a-2d84-418c-807a-3f1a88ee8500 Correlation ID: 274368d7-3f3d-4b76-8512-0de1e338dc1b Timestamp: 2026-06-12 16:59:22Z - Correlation ID: 274368d7-3f3d-4b76-8512-0de1e338dc1b - Trace ID: 3b40ea7a-2d84-418c-807a-3f1a88ee8500
Error getting the secret: invalid_client: 7000222 - [2026-06-12 16:59:22Z]: 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: 25c0827b-86af-40b9-8d11-c41d09533600 Correlation ID: 412ed163-0e2c-4501-81da-8a846c6e173c Timestamp: 2026-06-12 16:59:22Z - Correlation ID: 412ed163-0e2c-4501-81da-8a846c6e173c - Trace ID: 25c0827b-86af-40b9-8d11-c41d09533600
Error getting the secret: invalid_client: 7000222 - [2026-06-12 16:59:22Z]: 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: 9cafc75a-e72d-4c77-a31f-f760b8d15b00 Correlation ID: 81655c42-0ea4-40d4-934c-bec23edd8e5b Timestamp: 2026-06-12 16:59:22Z - Correlation ID: 81655c42-0ea4-40d4-934c-bec23edd8e5b - Trace ID: 9cafc75a-e72d-4c77-a31f-f760b8d15b00
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)