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-18 09:36:12Z]: 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: 3443d102-23ef-4829-b0c5-aadb9f150300 Correlation ID: 72f36260-89d1-48be-b49e-f70dbca67b61 Timestamp: 2026-07-18 09:36:12Z - Correlation ID: 72f36260-89d1-48be-b49e-f70dbca67b61 - Trace ID: 3443d102-23ef-4829-b0c5-aadb9f150300
(node:188) [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-18 09:36:12Z]: 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: 6980662a-d5c2-4cf9-aa3f-84a228930400 Correlation ID: 8c357c28-b88c-495e-8f69-46f0f6cd0e33 Timestamp: 2026-07-18 09:36:12Z - Correlation ID: 8c357c28-b88c-495e-8f69-46f0f6cd0e33 - Trace ID: 6980662a-d5c2-4cf9-aa3f-84a228930400
Error getting the secret: invalid_client: 7000222 - [2026-07-18 09:36:12Z]: 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: 054e3162-7971-405f-9a38-d58c8c650300 Correlation ID: 02d1eb0a-a872-471f-9d6d-765ead62d69c Timestamp: 2026-07-18 09:36:12Z - Correlation ID: 02d1eb0a-a872-471f-9d6d-765ead62d69c - Trace ID: 054e3162-7971-405f-9a38-d58c8c650300
Error getting the secret: invalid_client: 7000222 - [2026-07-18 09:36:13Z]: 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: 1b8fb2ce-5618-49bc-9867-02b917893500 Correlation ID: 7b0d5ec7-35a0-4105-bbc9-4353109c6f5f Timestamp: 2026-07-18 09:36:13Z - Correlation ID: 7b0d5ec7-35a0-4105-bbc9-4353109c6f5f - Trace ID: 1b8fb2ce-5618-49bc-9867-02b917893500
Error getting the secret: invalid_client: 7000222 - [2026-07-18 09:36:13Z]: 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: 8543d7ee-8db0-4b73-9f09-688e22360500 Correlation ID: 3b5c038a-7b61-435f-9c99-1557e337a780 Timestamp: 2026-07-18 09:36:13Z - Correlation ID: 3b5c038a-7b61-435f-9c99-1557e337a780 - Trace ID: 8543d7ee-8db0-4b73-9f09-688e22360500
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)