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-09 07:22:17Z]: 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: 02bb226f-a094-4816-a45f-0016eae86d00 Correlation ID: aa03ff10-188d-49fa-a4f0-aab4635fd87a Timestamp: 2026-07-09 07:22:17Z - Correlation ID: aa03ff10-188d-49fa-a4f0-aab4635fd87a - Trace ID: 02bb226f-a094-4816-a45f-0016eae86d00
(node:2360) [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-09 07:22:17Z]: 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: 02bb226f-a094-4816-a45f-0016f4e86d00 Correlation ID: 2ea0122e-42da-4452-a95b-fb4756796265 Timestamp: 2026-07-09 07:22:17Z - Correlation ID: 2ea0122e-42da-4452-a95b-fb4756796265 - Trace ID: 02bb226f-a094-4816-a45f-0016f4e86d00
Error getting the secret: invalid_client: 7000222 - [2026-07-09 07:22:17Z]: 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: c92b5161-2b08-48bd-ad9a-1831e4708600 Correlation ID: 51edcf67-61e8-4088-871f-90d8e7fc2f7b Timestamp: 2026-07-09 07:22:17Z - Correlation ID: 51edcf67-61e8-4088-871f-90d8e7fc2f7b - Trace ID: c92b5161-2b08-48bd-ad9a-1831e4708600
Error getting the secret: invalid_client: 7000222 - [2026-07-09 07:22:18Z]: 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: 258acaa5-94fd-4379-878e-40eddf0b7300 Correlation ID: 79cd7c69-e236-44fd-88a0-24a3e21b202d Timestamp: 2026-07-09 07:22:18Z - Correlation ID: 79cd7c69-e236-44fd-88a0-24a3e21b202d - Trace ID: 258acaa5-94fd-4379-878e-40eddf0b7300
Error getting the secret: invalid_client: 7000222 - [2026-07-09 07:22:18Z]: 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: fe990535-746a-4014-b9f0-c242dc6d8900 Correlation ID: 95ee59ed-79ef-449a-9c45-9d98ac1da141 Timestamp: 2026-07-09 07:22:18Z - Correlation ID: 95ee59ed-79ef-449a-9c45-9d98ac1da141 - Trace ID: fe990535-746a-4014-b9f0-c242dc6d8900
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)