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-02-20 10:34: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: 0d56de77-ecd0-470e-a5e8-04f8292e1800 Correlation ID: fe3a8d99-3004-40aa-8cfb-c1ea3244b8ae Timestamp: 2026-02-20 10:34:06Z - Correlation ID: fe3a8d99-3004-40aa-8cfb-c1ea3244b8ae - Trace ID: 0d56de77-ecd0-470e-a5e8-04f8292e1800
(node:1888) [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-02-20 10:34: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: 00ba3b9e-5040-4348-a47b-38a162631900 Correlation ID: 0301e5e3-90dd-4090-b242-4d3e2ff41c31 Timestamp: 2026-02-20 10:34:06Z - Correlation ID: 0301e5e3-90dd-4090-b242-4d3e2ff41c31 - Trace ID: 00ba3b9e-5040-4348-a47b-38a162631900
Error getting the secret: invalid_client: 7000222 - [2026-02-20 10:34: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: 00ba3b9e-5040-4348-a47b-38a166631900 Correlation ID: fa8f26f7-45d7-4738-a6e6-e9bea6ae16d2 Timestamp: 2026-02-20 10:34:07Z - Correlation ID: fa8f26f7-45d7-4738-a6e6-e9bea6ae16d2 - Trace ID: 00ba3b9e-5040-4348-a47b-38a166631900
Error getting the secret: invalid_client: 7000222 - [2026-02-20 10:34: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: 9bf26522-9a60-4951-a6cc-f4e6f9aa2200 Correlation ID: 584b4d9e-b023-483f-b10c-2725b8cc63c6 Timestamp: 2026-02-20 10:34:07Z - Correlation ID: 584b4d9e-b023-483f-b10c-2725b8cc63c6 - Trace ID: 9bf26522-9a60-4951-a6cc-f4e6f9aa2200
Error getting the secret: invalid_client: 7000222 - [2026-02-20 10:34: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: 6d7f71af-19cd-4240-b815-02f7e24c1900 Correlation ID: 0bb8b335-24f3-4131-ab9d-4d43f5c324ce Timestamp: 2026-02-20 10:34:07Z - Correlation ID: 0bb8b335-24f3-4131-ab9d-4d43f5c324ce - Trace ID: 6d7f71af-19cd-4240-b815-02f7e24c1900
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)