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-25 16:33:45Z]: 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: 4f22c533-6b68-4853-a847-9a742d633800 Correlation ID: b04f97d7-a479-414d-8b81-53aacdfbab34 Timestamp: 2026-07-25 16:33:45Z - Correlation ID: b04f97d7-a479-414d-8b81-53aacdfbab34 - Trace ID: 4f22c533-6b68-4853-a847-9a742d633800
(node:2244) [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-25 16:33:45Z]: 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: d0f469c1-41b5-4f3d-8825-90dcf6ee1400 Correlation ID: ffc29269-abcf-4c75-bae1-2fa4ae7dc077 Timestamp: 2026-07-25 16:33:45Z - Correlation ID: ffc29269-abcf-4c75-bae1-2fa4ae7dc077 - Trace ID: d0f469c1-41b5-4f3d-8825-90dcf6ee1400
Error getting the secret: invalid_client: 7000222 - [2026-07-25 16:33:45Z]: 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: 41e1d323-bbe3-4be0-b305-e17dee1e3500 Correlation ID: 8e18e74c-af69-4cc9-9a89-84380ebe5260 Timestamp: 2026-07-25 16:33:45Z - Correlation ID: 8e18e74c-af69-4cc9-9a89-84380ebe5260 - Trace ID: 41e1d323-bbe3-4be0-b305-e17dee1e3500
Error getting the secret: invalid_client: 7000222 - [2026-07-25 16:33:45Z]: 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: 4f22c533-6b68-4853-a847-9a7436633800 Correlation ID: dbdf3b94-532e-4b2a-b5c6-aa9ad044436e Timestamp: 2026-07-25 16:33:45Z - Correlation ID: dbdf3b94-532e-4b2a-b5c6-aa9ad044436e - Trace ID: 4f22c533-6b68-4853-a847-9a7436633800
Error getting the secret: invalid_client: 7000222 - [2026-07-25 16:33:46Z]: 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: 628ef8b8-3771-4be2-896b-877766c51e00 Correlation ID: de5b1547-4f45-4dcc-9da7-673fad8a5d1f Timestamp: 2026-07-25 16:33:46Z - Correlation ID: de5b1547-4f45-4dcc-9da7-673fad8a5d1f - Trace ID: 628ef8b8-3771-4be2-896b-877766c51e00
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)