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 23:03:06Z]: 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: da943575-da71-4dd6-a72a-ea4465200e00 Correlation ID: 0b84f753-123c-4cd4-9e95-fecf70f8aaa0 Timestamp: 2026-04-27 23:03:06Z - Correlation ID: 0b84f753-123c-4cd4-9e95-fecf70f8aaa0 - Trace ID: da943575-da71-4dd6-a72a-ea4465200e00
(node:4772) [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 23:03:07Z]: 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: da943575-da71-4dd6-a72a-ea4471200e00 Correlation ID: 0841ee49-02cc-4764-a342-baa760042120 Timestamp: 2026-04-27 23:03:07Z - Correlation ID: 0841ee49-02cc-4764-a342-baa760042120 - Trace ID: da943575-da71-4dd6-a72a-ea4471200e00
Error getting the secret: invalid_client: 7000222 - [2026-04-27 23:03:07Z]: 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: 2a3016cd-1ad0-4c0d-844e-30cea00e4600 Correlation ID: 80519d77-78d0-4390-87e9-7591281b4784 Timestamp: 2026-04-27 23:03:07Z - Correlation ID: 80519d77-78d0-4390-87e9-7591281b4784 - Trace ID: 2a3016cd-1ad0-4c0d-844e-30cea00e4600
Error getting the secret: invalid_client: 7000222 - [2026-04-27 23:03:07Z]: 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: 45fd31a5-85c6-404f-9703-4ff78bd66f00 Correlation ID: 23c960ad-2ddf-4cd3-8469-0a118d72ffa3 Timestamp: 2026-04-27 23:03:07Z - Correlation ID: 23c960ad-2ddf-4cd3-8469-0a118d72ffa3 - Trace ID: 45fd31a5-85c6-404f-9703-4ff78bd66f00
Error getting the secret: invalid_client: 7000222 - [2026-04-27 23:03:07Z]: 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: bab029d8-8b30-4b94-9769-8520cadc5000 Correlation ID: ac3d0f27-f20b-4fa8-8f6e-c3a47f80cc57 Timestamp: 2026-04-27 23:03:07Z - Correlation ID: ac3d0f27-f20b-4fa8-8f6e-c3a47f80cc57 - Trace ID: bab029d8-8b30-4b94-9769-8520cadc5000
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)