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-16 15:36: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: 2ef09f91-874d-4736-abf1-1c59f0801200 Correlation ID: 3d489b79-3f3e-4c28-a310-091902b4a483 Timestamp: 2026-07-16 15:36:44Z - Correlation ID: 3d489b79-3f3e-4c28-a310-091902b4a483 - Trace ID: 2ef09f91-874d-4736-abf1-1c59f0801200
(node:4712) [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-16 15:36: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: dc3ca0fe-6d6a-46e4-9957-c9603aca2900 Correlation ID: 73768226-c7a1-4146-b9c0-543bcb90a1da Timestamp: 2026-07-16 15:36:44Z - Correlation ID: 73768226-c7a1-4146-b9c0-543bcb90a1da - Trace ID: dc3ca0fe-6d6a-46e4-9957-c9603aca2900
Error getting the secret: invalid_client: 7000222 - [2026-07-16 15:36: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: c88023b0-9ff8-4959-9790-acd9e0e43200 Correlation ID: 8b067603-61cd-47af-a7af-5a77ae686c82 Timestamp: 2026-07-16 15:36:45Z - Correlation ID: 8b067603-61cd-47af-a7af-5a77ae686c82 - Trace ID: c88023b0-9ff8-4959-9790-acd9e0e43200
Error getting the secret: invalid_client: 7000222 - [2026-07-16 15:36: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: 727502d0-0401-49d8-914d-eaa43d0e3600 Correlation ID: 33dd2e27-3f98-4229-a030-2c0bfeab7db3 Timestamp: 2026-07-16 15:36:45Z - Correlation ID: 33dd2e27-3f98-4229-a030-2c0bfeab7db3 - Trace ID: 727502d0-0401-49d8-914d-eaa43d0e3600
Error getting the secret: invalid_client: 7000222 - [2026-07-16 15:36: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: 49f21e58-16d7-407c-8193-31aa87ec3500 Correlation ID: 148a91e2-9686-431d-be93-cdd7fd949e60 Timestamp: 2026-07-16 15:36:45Z - Correlation ID: 148a91e2-9686-431d-be93-cdd7fd949e60 - Trace ID: 49f21e58-16d7-407c-8193-31aa87ec3500
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)