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-17 23:33:11Z]: 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: 5ac127e3-5f83-4665-8c79-aa0495195900 Correlation ID: c8a0cf56-e476-4d39-bc83-78e9b51b0e97 Timestamp: 2026-07-17 23:33:11Z - Correlation ID: c8a0cf56-e476-4d39-bc83-78e9b51b0e97 - Trace ID: 5ac127e3-5f83-4665-8c79-aa0495195900
(node:1256) [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-17 23:33: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: b5b62579-faf8-4ed9-8b34-3d1a6f135600 Correlation ID: b3ff0cdb-dde8-4931-8c83-57e5d908bde1 Timestamp: 2026-07-17 23:33:12Z - Correlation ID: b3ff0cdb-dde8-4931-8c83-57e5d908bde1 - Trace ID: b5b62579-faf8-4ed9-8b34-3d1a6f135600
Error getting the secret: invalid_client: 7000222 - [2026-07-17 23:33: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: 92631807-46bc-43ac-aca3-cca6eecb5600 Correlation ID: ad3b5277-0859-4ee1-99e2-6f450e7e506b Timestamp: 2026-07-17 23:33:12Z - Correlation ID: ad3b5277-0859-4ee1-99e2-6f450e7e506b - Trace ID: 92631807-46bc-43ac-aca3-cca6eecb5600
Error getting the secret: invalid_client: 7000222 - [2026-07-17 23:33: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: f2ccf6d2-d752-48ab-9e85-deb46e642100 Correlation ID: e23624ce-713c-42fc-9783-52fd04edd11e Timestamp: 2026-07-17 23:33:12Z - Correlation ID: e23624ce-713c-42fc-9783-52fd04edd11e - Trace ID: f2ccf6d2-d752-48ab-9e85-deb46e642100
Error getting the secret: invalid_client: 7000222 - [2026-07-17 23:33: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: b5b62579-faf8-4ed9-8b34-3d1a7f135600 Correlation ID: c4fe2754-20de-41aa-9ca1-ad21844fac43 Timestamp: 2026-07-17 23:33:12Z - Correlation ID: c4fe2754-20de-41aa-9ca1-ad21844fac43 - Trace ID: b5b62579-faf8-4ed9-8b34-3d1a7f135600
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)