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-26 12:24: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: 68a70d23-b09a-47f5-9b0d-7ef3946c1800 Correlation ID: 4bebe0fb-d294-4404-9ee2-275004bb56d0 Timestamp: 2026-07-26 12:24:24Z - Correlation ID: 4bebe0fb-d294-4404-9ee2-275004bb56d0 - Trace ID: 68a70d23-b09a-47f5-9b0d-7ef3946c1800
(node:5876) [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-26 12:24: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: 147b4ad8-4248-4352-ba72-963a29be5500 Correlation ID: e7e4b126-bce9-45ee-87d5-772b4ee033db Timestamp: 2026-07-26 12:24:24Z - Correlation ID: e7e4b126-bce9-45ee-87d5-772b4ee033db - Trace ID: 147b4ad8-4248-4352-ba72-963a29be5500
Error getting the secret: invalid_client: 7000222 - [2026-07-26 12:24: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: 68a70d23-b09a-47f5-9b0d-7ef3986c1800 Correlation ID: fc7f873d-1b54-43b8-9935-1f157691476d Timestamp: 2026-07-26 12:24:24Z - Correlation ID: fc7f873d-1b54-43b8-9935-1f157691476d - Trace ID: 68a70d23-b09a-47f5-9b0d-7ef3986c1800
Error getting the secret: invalid_client: 7000222 - [2026-07-26 12:24: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: 147b4ad8-4248-4352-ba72-963a2bbe5500 Correlation ID: cbd86597-4721-46b3-b714-40e1bba35be1 Timestamp: 2026-07-26 12:24:24Z - Correlation ID: cbd86597-4721-46b3-b714-40e1bba35be1 - Trace ID: 147b4ad8-4248-4352-ba72-963a2bbe5500
Error getting the secret: invalid_client: 7000222 - [2026-07-26 12:24:25Z]: 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: 72cfef56-e019-4bd2-a436-96c527803300 Correlation ID: 55c74ef6-af16-48ab-a31f-3797c8c27fde Timestamp: 2026-07-26 12:24:25Z - Correlation ID: 55c74ef6-af16-48ab-a31f-3797c8c27fde - Trace ID: 72cfef56-e019-4bd2-a436-96c527803300
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)