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-01 08:21: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: 45ad5c93-db9e-4810-9713-041aa02a1300 Correlation ID: a8c8fd1a-a758-4552-a165-6ae21a5fe979 Timestamp: 2026-07-01 08:21:24Z - Correlation ID: a8c8fd1a-a758-4552-a165-6ae21a5fe979 - Trace ID: 45ad5c93-db9e-4810-9713-041aa02a1300
(node:2428) [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-01 08:21: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: 33d2aa7b-7609-45f2-a6ea-095ac8746900 Correlation ID: fa9c2f1f-5952-44c2-b3ff-96283cb5ca42 Timestamp: 2026-07-01 08:21:24Z - Correlation ID: fa9c2f1f-5952-44c2-b3ff-96283cb5ca42 - Trace ID: 33d2aa7b-7609-45f2-a6ea-095ac8746900
Error getting the secret: invalid_client: 7000222 - [2026-07-01 08:21: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: db161870-db94-4d7b-b5a3-b914c4b06400 Correlation ID: 3767a642-41a8-4dcf-9bbe-40043d79e1d8 Timestamp: 2026-07-01 08:21:25Z - Correlation ID: 3767a642-41a8-4dcf-9bbe-40043d79e1d8 - Trace ID: db161870-db94-4d7b-b5a3-b914c4b06400
Error getting the secret: invalid_client: 7000222 - [2026-07-01 08:21: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: cae75ebb-86d6-4813-8e9a-a45059c90300 Correlation ID: 162965c4-7e7a-45e3-84c4-35ab203c537f Timestamp: 2026-07-01 08:21:25Z - Correlation ID: 162965c4-7e7a-45e3-84c4-35ab203c537f - Trace ID: cae75ebb-86d6-4813-8e9a-a45059c90300
Error getting the secret: invalid_client: 7000222 - [2026-07-01 08:21: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: f05e28f6-fef8-4bae-9080-d2c3ded90200 Correlation ID: e05008b4-c2c4-42cd-acd7-065db0c173b6 Timestamp: 2026-07-01 08:21:25Z - Correlation ID: e05008b4-c2c4-42cd-acd7-065db0c173b6 - Trace ID: f05e28f6-fef8-4bae-9080-d2c3ded90200
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)