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-04-20 11:37:22Z]: 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: cfc54055-a326-48d9-8872-b9347f7a0b00 Correlation ID: f37fa324-0a7b-46c2-a00d-7a0bdb09b35f Timestamp: 2026-04-20 11:37:22Z - Correlation ID: f37fa324-0a7b-46c2-a00d-7a0bdb09b35f - Trace ID: cfc54055-a326-48d9-8872-b9347f7a0b00
(node:3396) [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-04-20 11:37:22Z]: 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: 7f7f8605-f0fa-42c9-b8ee-457983f00f00 Correlation ID: 8d215f64-62b4-4d70-9a4d-d30a528750ee Timestamp: 2026-04-20 11:37:22Z - Correlation ID: 8d215f64-62b4-4d70-9a4d-d30a528750ee - Trace ID: 7f7f8605-f0fa-42c9-b8ee-457983f00f00
Error getting the secret: invalid_client: 7000222 - [2026-04-20 11:37:22Z]: 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: 46ff40ac-9436-4e1a-b042-6f1f23a50700 Correlation ID: 27ccd342-297b-4ff7-9f01-9d05a6762f8e Timestamp: 2026-04-20 11:37:22Z - Correlation ID: 27ccd342-297b-4ff7-9f01-9d05a6762f8e - Trace ID: 46ff40ac-9436-4e1a-b042-6f1f23a50700
Error getting the secret: invalid_client: 7000222 - [2026-04-20 11:37:23Z]: 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: 7f7f8605-f0fa-42c9-b8ee-45798ff00f00 Correlation ID: afcc2898-42c0-436b-ad1e-ee1624bcb398 Timestamp: 2026-04-20 11:37:23Z - Correlation ID: afcc2898-42c0-436b-ad1e-ee1624bcb398 - Trace ID: 7f7f8605-f0fa-42c9-b8ee-45798ff00f00
Error getting the secret: invalid_client: 7000222 - [2026-04-20 11:37:23Z]: 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: 46ff40ac-9436-4e1a-b042-6f1f30a50700 Correlation ID: ca333681-4c41-474b-afe5-34efd8a60295 Timestamp: 2026-04-20 11:37:23Z - Correlation ID: ca333681-4c41-474b-afe5-34efd8a60295 - Trace ID: 46ff40ac-9436-4e1a-b042-6f1f30a50700
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)