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-04-27 11:06:44Z]: 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: 4f56e008-91af-4486-be85-7877a62b3e00 Correlation ID: 931dadff-70db-4930-9036-b26355d6f696 Timestamp: 2026-04-27 11:06:44Z - Correlation ID: 931dadff-70db-4930-9036-b26355d6f696 - Trace ID: 4f56e008-91af-4486-be85-7877a62b3e00
(node:4724) [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-04-27 11:06:45Z]: 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: 6ebf0dee-312e-45f5-89e6-b3685c683100 Correlation ID: e598d1f1-6f51-475c-b3d5-bf0dfdcbc68e Timestamp: 2026-04-27 11:06:45Z - Correlation ID: e598d1f1-6f51-475c-b3d5-bf0dfdcbc68e - Trace ID: 6ebf0dee-312e-45f5-89e6-b3685c683100
Error getting the secret: invalid_client: 7000222 - [2026-04-27 11:06:45Z]: 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: 20cc1112-a30e-4d8c-b24d-77cc063e3c00 Correlation ID: 634e59a5-d8fb-43ba-817e-90d28397ca3e Timestamp: 2026-04-27 11:06:45Z - Correlation ID: 634e59a5-d8fb-43ba-817e-90d28397ca3e - Trace ID: 20cc1112-a30e-4d8c-b24d-77cc063e3c00
Error getting the secret: invalid_client: 7000222 - [2026-04-27 11:06:46Z]: 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: 2fa580be-d30a-46fa-b10f-94abb4a23500 Correlation ID: b92cdac6-584f-46fb-97cc-239effc3b164 Timestamp: 2026-04-27 11:06:46Z - Correlation ID: b92cdac6-584f-46fb-97cc-239effc3b164 - Trace ID: 2fa580be-d30a-46fa-b10f-94abb4a23500
Error getting the secret: invalid_client: 7000222 - [2026-04-27 11:06:46Z]: 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: 6ebf0dee-312e-45f5-89e6-b36868683100 Correlation ID: 17f0773b-b2e9-48ac-84a4-084b382d14ef Timestamp: 2026-04-27 11:06:46Z - Correlation ID: 17f0773b-b2e9-48ac-84a4-084b382d14ef - Trace ID: 6ebf0dee-312e-45f5-89e6-b36868683100
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)