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-26 02:25:10Z]: 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: 933214d7-4bcb-49c1-8201-d5e5742d0200 Correlation ID: f2d5e075-7565-43b8-a25b-c961beea3509 Timestamp: 2026-07-26 02:25:10Z - Correlation ID: f2d5e075-7565-43b8-a25b-c961beea3509 - Trace ID: 933214d7-4bcb-49c1-8201-d5e5742d0200
(node:544) [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-26 02:25:10Z]: 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: 63cf3410-aff4-47d2-b2f6-12f03f5d5a00 Correlation ID: b1879463-b87b-40eb-bec4-677b9330c83a Timestamp: 2026-07-26 02:25:10Z - Correlation ID: b1879463-b87b-40eb-bec4-677b9330c83a - Trace ID: 63cf3410-aff4-47d2-b2f6-12f03f5d5a00
Error getting the secret: invalid_client: 7000222 - [2026-07-26 02:25: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: 9dc99f88-835c-4dec-bd11-352830742500 Correlation ID: 9a0acba2-5950-4751-ac4c-b676c9691f26 Timestamp: 2026-07-26 02:25:11Z - Correlation ID: 9a0acba2-5950-4751-ac4c-b676c9691f26 - Trace ID: 9dc99f88-835c-4dec-bd11-352830742500
Error getting the secret: invalid_client: 7000222 - [2026-07-26 02:25: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: d0f0f84c-0785-4da3-b542-537b145a3100 Correlation ID: 2c737e82-8dc9-40b5-8cc6-e8b769782141 Timestamp: 2026-07-26 02:25:11Z - Correlation ID: 2c737e82-8dc9-40b5-8cc6-e8b769782141 - Trace ID: d0f0f84c-0785-4da3-b542-537b145a3100
Error getting the secret: invalid_client: 7000222 - [2026-07-26 02:25: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: 63cf3410-aff4-47d2-b2f6-12f04e5d5a00 Correlation ID: 2f440a6e-f575-4f42-b172-74966990edc9 Timestamp: 2026-07-26 02:25:11Z - Correlation ID: 2f440a6e-f575-4f42-b172-74966990edc9 - Trace ID: 63cf3410-aff4-47d2-b2f6-12f04e5d5a00
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)