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-19 11:42:24Z]: 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: 39beda6f-5439-433c-8476-135a18601500 Correlation ID: 28d6fdc4-4a07-4d3e-b677-82c1cd4abb01 Timestamp: 2026-07-19 11:42:24Z - Correlation ID: 28d6fdc4-4a07-4d3e-b677-82c1cd4abb01 - Trace ID: 39beda6f-5439-433c-8476-135a18601500
(node:2328) [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-19 11:42:24Z]: 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: 72d0fb29-7250-437a-87dc-b08c30331600 Correlation ID: 62c329d0-36c2-4de2-ae28-bdaede736f22 Timestamp: 2026-07-19 11:42:24Z - Correlation ID: 62c329d0-36c2-4de2-ae28-bdaede736f22 - Trace ID: 72d0fb29-7250-437a-87dc-b08c30331600
Error getting the secret: invalid_client: 7000222 - [2026-07-19 11:42:24Z]: 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: 347184ef-d94d-47fe-990b-b62884721500 Correlation ID: a4a89b1f-f920-429c-9333-5a5ad4dab6fc Timestamp: 2026-07-19 11:42:24Z - Correlation ID: a4a89b1f-f920-429c-9333-5a5ad4dab6fc - Trace ID: 347184ef-d94d-47fe-990b-b62884721500
Error getting the secret: invalid_client: 7000222 - [2026-07-19 11:42:24Z]: 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: 60423484-2f69-4200-9ad1-48b137e71400 Correlation ID: 6ebe0dda-d946-40a8-b743-a7bd574fc73e Timestamp: 2026-07-19 11:42:24Z - Correlation ID: 6ebe0dda-d946-40a8-b743-a7bd574fc73e - Trace ID: 60423484-2f69-4200-9ad1-48b137e71400
Error getting the secret: invalid_client: 7000222 - [2026-07-19 11:42:24Z]: 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: 72d0fb29-7250-437a-87dc-b08c37331600 Correlation ID: 498338a4-fe25-40a2-9554-64a5fff9b872 Timestamp: 2026-07-19 11:42:24Z - Correlation ID: 498338a4-fe25-40a2-9554-64a5fff9b872 - Trace ID: 72d0fb29-7250-437a-87dc-b08c37331600
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)