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-06-12 23:53:32Z]: 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: e11a0617-f10f-40a3-b083-95ec34998000 Correlation ID: f05e54e3-07dd-416d-8a23-cafea739d68c Timestamp: 2026-06-12 23:53:32Z - Correlation ID: f05e54e3-07dd-416d-8a23-cafea739d68c - Trace ID: e11a0617-f10f-40a3-b083-95ec34998000
(node:5656) [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-06-12 23:53:33Z]: 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: e11a0617-f10f-40a3-b083-95ec39998000 Correlation ID: 36e51e47-85f1-48e7-8bf6-213ae4d0e518 Timestamp: 2026-06-12 23:53:33Z - Correlation ID: 36e51e47-85f1-48e7-8bf6-213ae4d0e518 - Trace ID: e11a0617-f10f-40a3-b083-95ec39998000
Error getting the secret: invalid_client: 7000222 - [2026-06-12 23:53:33Z]: 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: 5f0cb52c-6d52-4b41-9ded-65324f057400 Correlation ID: a56ab175-3290-4438-9bee-fa945ff354a7 Timestamp: 2026-06-12 23:53:33Z - Correlation ID: a56ab175-3290-4438-9bee-fa945ff354a7 - Trace ID: 5f0cb52c-6d52-4b41-9ded-65324f057400
Error getting the secret: invalid_client: 7000222 - [2026-06-12 23:53:33Z]: 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: 5f0cb52c-6d52-4b41-9ded-653257057400 Correlation ID: 6975df9a-0d02-4d49-8ede-460e33befb27 Timestamp: 2026-06-12 23:53:33Z - Correlation ID: 6975df9a-0d02-4d49-8ede-460e33befb27 - Trace ID: 5f0cb52c-6d52-4b41-9ded-653257057400
Error getting the secret: invalid_client: 7000222 - [2026-06-12 23:53:34Z]: 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: 18ceb283-f98f-4d64-9542-53797d1d9800 Correlation ID: 3306c4ff-5762-4443-8ed1-df6f4e633be3 Timestamp: 2026-06-12 23:53:34Z - Correlation ID: 3306c4ff-5762-4443-8ed1-df6f4e633be3 - Trace ID: 18ceb283-f98f-4d64-9542-53797d1d9800
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)