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-09 01:34:03Z]: 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: c8224eb8-b35b-42ee-9b7d-343f42947a00 Correlation ID: a05899bf-9d95-4e43-a15a-9aa15b2b25f4 Timestamp: 2026-07-09 01:34:03Z - Correlation ID: a05899bf-9d95-4e43-a15a-9aa15b2b25f4 - Trace ID: c8224eb8-b35b-42ee-9b7d-343f42947a00
(node:4824) [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-09 01:34:03Z]: 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: 20de2bef-96e9-42e5-9efb-7986b4a96f00 Correlation ID: 2e6bc7ff-3c47-4041-95bd-9a7027c2412b Timestamp: 2026-07-09 01:34:03Z - Correlation ID: 2e6bc7ff-3c47-4041-95bd-9a7027c2412b - Trace ID: 20de2bef-96e9-42e5-9efb-7986b4a96f00
Error getting the secret: invalid_client: 7000222 - [2026-07-09 01:34:03Z]: 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: 2ceefda1-1241-44bc-9b58-b12464560e00 Correlation ID: 1cd5d354-58f7-4c6a-a0f5-d49924e70a66 Timestamp: 2026-07-09 01:34:03Z - Correlation ID: 1cd5d354-58f7-4c6a-a0f5-d49924e70a66 - Trace ID: 2ceefda1-1241-44bc-9b58-b12464560e00
Error getting the secret: invalid_client: 7000222 - [2026-07-09 01:34:03Z]: 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: 69f772d1-559c-4e7e-9258-dd405ac73800 Correlation ID: 6e5a3170-6ad6-4f3b-8034-79c5f5c1982e Timestamp: 2026-07-09 01:34:03Z - Correlation ID: 6e5a3170-6ad6-4f3b-8034-79c5f5c1982e - Trace ID: 69f772d1-559c-4e7e-9258-dd405ac73800
Error getting the secret: invalid_client: 7000222 - [2026-07-09 01:34:04Z]: 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: 36316974-f74e-48fd-824b-21e615a08c00 Correlation ID: a99cc628-101c-4ea2-94e6-db00030a7b14 Timestamp: 2026-07-09 01:34:04Z - Correlation ID: a99cc628-101c-4ea2-94e6-db00030a7b14 - Trace ID: 36316974-f74e-48fd-824b-21e615a08c00
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)