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-14 03:24:01Z]: 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: d3a72aee-56d5-449c-ab3f-5da263672f00 Correlation ID: 0c2bd753-bcd6-4e02-984c-346cb1b9dc30 Timestamp: 2026-07-14 03:24:01Z - Correlation ID: 0c2bd753-bcd6-4e02-984c-346cb1b9dc30 - Trace ID: d3a72aee-56d5-449c-ab3f-5da263672f00
(node:2276) [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-14 03:24:01Z]: 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: 4f4c1f69-86db-4f0e-8404-8b18d0e62b00 Correlation ID: 436ca534-4227-4e95-8e6d-19bdb10aeda4 Timestamp: 2026-07-14 03:24:01Z - Correlation ID: 436ca534-4227-4e95-8e6d-19bdb10aeda4 - Trace ID: 4f4c1f69-86db-4f0e-8404-8b18d0e62b00
Error getting the secret: invalid_client: 7000222 - [2026-07-14 03:24:01Z]: 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: 6d5f4328-0146-497c-a3a6-aff3967e0600 Correlation ID: 1789b7b6-4a8e-4f5c-a533-d2e6d2af9140 Timestamp: 2026-07-14 03:24:01Z - Correlation ID: 1789b7b6-4a8e-4f5c-a533-d2e6d2af9140 - Trace ID: 6d5f4328-0146-497c-a3a6-aff3967e0600
Error getting the secret: invalid_client: 7000222 - [2026-07-14 03:24:02Z]: 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: 631536c8-73c1-4293-b7d7-0a4bc9f92100 Correlation ID: f2b679e4-5d2d-4057-baf5-004a1a6f3e1a Timestamp: 2026-07-14 03:24:02Z - Correlation ID: f2b679e4-5d2d-4057-baf5-004a1a6f3e1a - Trace ID: 631536c8-73c1-4293-b7d7-0a4bc9f92100
Error getting the secret: invalid_client: 7000222 - [2026-07-14 03:24:02Z]: 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: 07be02b9-cef9-46c3-a3c7-ff69f2253000 Correlation ID: 3538f4fd-9efa-4a34-ba47-96264ec60fd5 Timestamp: 2026-07-14 03:24:02Z - Correlation ID: 3538f4fd-9efa-4a34-ba47-96264ec60fd5 - Trace ID: 07be02b9-cef9-46c3-a3c7-ff69f2253000
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)