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-18 04:03: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: 52fd757e-13d5-419a-b662-c5d0835a7b00 Correlation ID: 63f157e1-5dcd-4eb0-bea1-1eb68567b473 Timestamp: 2026-06-18 04:03:33Z - Correlation ID: 63f157e1-5dcd-4eb0-bea1-1eb68567b473 - Trace ID: 52fd757e-13d5-419a-b662-c5d0835a7b00
(node:7096) [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-18 04:03: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: c3424602-e15b-41a9-8d29-43d70ac40000 Correlation ID: c8d12c20-860b-452f-a1ff-305b75af390e Timestamp: 2026-06-18 04:03:33Z - Correlation ID: c8d12c20-860b-452f-a1ff-305b75af390e - Trace ID: c3424602-e15b-41a9-8d29-43d70ac40000
Error getting the secret: invalid_client: 7000222 - [2026-06-18 04:03: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: 52fd757e-13d5-419a-b662-c5d0915a7b00 Correlation ID: 0200777b-5028-42ac-bf7c-a1d087ad012e Timestamp: 2026-06-18 04:03:34Z - Correlation ID: 0200777b-5028-42ac-bf7c-a1d087ad012e - Trace ID: 52fd757e-13d5-419a-b662-c5d0915a7b00
Error getting the secret: invalid_client: 7000222 - [2026-06-18 04:03: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: a6ff609b-192f-4203-a6a0-6cec9e816400 Correlation ID: 7ceffac9-7031-4c49-bfb1-776cf5cffe9d Timestamp: 2026-06-18 04:03:34Z - Correlation ID: 7ceffac9-7031-4c49-bfb1-776cf5cffe9d - Trace ID: a6ff609b-192f-4203-a6a0-6cec9e816400
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:25:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)