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-26 11:42:28Z]: 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: 8069cb5b-f070-4452-9814-438166b70100 Correlation ID: b4bcbb08-b2e0-40a7-9edd-48d1ac20d6e7 Timestamp: 2026-02-26 11:42:28Z - Correlation ID: b4bcbb08-b2e0-40a7-9edd-48d1ac20d6e7 - Trace ID: 8069cb5b-f070-4452-9814-438166b70100
(node:5808) [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-26 11:42:28Z]: 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: dbd3d923-abf1-4aad-9dbf-f84d5f301d00 Correlation ID: 14b70187-b90a-4381-be94-af4151d336c8 Timestamp: 2026-02-26 11:42:28Z - Correlation ID: 14b70187-b90a-4381-be94-af4151d336c8 - Trace ID: dbd3d923-abf1-4aad-9dbf-f84d5f301d00
Error getting the secret: invalid_client: 7000222 - [2026-02-26 11:42:28Z]: 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: 1182aa5b-e9b0-4223-b4f5-3cb0223c0200 Correlation ID: a1c8e33f-54c1-46a4-8550-4067729864f3 Timestamp: 2026-02-26 11:42:28Z - Correlation ID: a1c8e33f-54c1-46a4-8550-4067729864f3 - Trace ID: 1182aa5b-e9b0-4223-b4f5-3cb0223c0200
Error getting the secret: invalid_client: 7000222 - [2026-02-26 11:42:28Z]: 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: 80875ee4-39ec-43f6-be9e-6bbab2493200 Correlation ID: faddede8-6fd4-486f-beec-36690eb21bd9 Timestamp: 2026-02-26 11:42:28Z - Correlation ID: faddede8-6fd4-486f-beec-36690eb21bd9 - Trace ID: 80875ee4-39ec-43f6-be9e-6bbab2493200
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:25:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)