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-06 01:30:40Z]: 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: f04f84bc-c484-484a-ab2b-ec08ef192200 Correlation ID: 3d65974e-2976-458c-a677-761ce134c505 Timestamp: 2026-07-06 01:30:40Z - Correlation ID: 3d65974e-2976-458c-a677-761ce134c505 - Trace ID: f04f84bc-c484-484a-ab2b-ec08ef192200
(node:684) [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-06 01:30:41Z]: 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: 2e75936b-2bf4-4378-9d1a-5cee2f4a2000 Correlation ID: 4b288d3f-b8c3-4a89-bf89-f6f7a903ceae Timestamp: 2026-07-06 01:30:41Z - Correlation ID: 4b288d3f-b8c3-4a89-bf89-f6f7a903ceae - Trace ID: 2e75936b-2bf4-4378-9d1a-5cee2f4a2000
Error getting the secret: invalid_client: 7000222 - [2026-07-06 01:30:41Z]: 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: 6ffe29a9-f086-44b9-8177-0e5e5c192100 Correlation ID: a533ea9b-8ffa-4d9a-86bb-660e26cd4fd2 Timestamp: 2026-07-06 01:30:41Z - Correlation ID: a533ea9b-8ffa-4d9a-86bb-660e26cd4fd2 - Trace ID: 6ffe29a9-f086-44b9-8177-0e5e5c192100
Error getting the secret: invalid_client: 7000222 - [2026-07-06 01:30:41Z]: 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: aa1eb1b5-862d-484e-aecc-4da6e3822200 Correlation ID: 44912363-013d-45ad-95e6-273e491b30ed Timestamp: 2026-07-06 01:30:41Z - Correlation ID: 44912363-013d-45ad-95e6-273e491b30ed - Trace ID: aa1eb1b5-862d-484e-aecc-4da6e3822200
Error getting the secret: invalid_client: 7000222 - [2026-07-06 01:30:42Z]: 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: 6d0e69c2-f96a-4171-88b2-479c5b852e00 Correlation ID: 06634f5c-8a68-4067-b011-a00e2818bd59 Timestamp: 2026-07-06 01:30:42Z - Correlation ID: 06634f5c-8a68-4067-b011-a00e2818bd59 - Trace ID: 6d0e69c2-f96a-4171-88b2-479c5b852e00
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)