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-25 04:31: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: 94caab24-8485-4f4f-a787-ce6859103d00 Correlation ID: 22a329f1-65c5-4499-abe3-21fc72447da8 Timestamp: 2026-07-25 04:31:33Z - Correlation ID: 22a329f1-65c5-4499-abe3-21fc72447da8 - Trace ID: 94caab24-8485-4f4f-a787-ce6859103d00
(node:4196) [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-25 04:31: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: 245b4507-5006-4de6-96d0-e958b1717500 Correlation ID: 43143adc-2f45-47f2-b84d-b7f4765f1194 Timestamp: 2026-07-25 04:31:34Z - Correlation ID: 43143adc-2f45-47f2-b84d-b7f4765f1194 - Trace ID: 245b4507-5006-4de6-96d0-e958b1717500
Error getting the secret: invalid_client: 7000222 - [2026-07-25 04:31: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: 16816e77-eb18-48e7-9cac-31eaed2d0100 Correlation ID: b9d8d223-d368-4267-97f2-cbf7c932eaf5 Timestamp: 2026-07-25 04:31:34Z - Correlation ID: b9d8d223-d368-4267-97f2-cbf7c932eaf5 - Trace ID: 16816e77-eb18-48e7-9cac-31eaed2d0100
Error getting the secret: invalid_client: 7000222 - [2026-07-25 04:31: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: b0c596f8-01d5-44a1-a315-2146eb9f4600 Correlation ID: 6395049c-567f-4fdc-a63e-7704aa366b78 Timestamp: 2026-07-25 04:31:34Z - Correlation ID: 6395049c-567f-4fdc-a63e-7704aa366b78 - Trace ID: b0c596f8-01d5-44a1-a315-2146eb9f4600
Error getting the secret: invalid_client: 7000222 - [2026-07-25 04:31: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: 4ddeea5f-3a82-4691-985c-5a49e95b3600 Correlation ID: 99250d46-b434-4bc0-9ce2-c9e8d26bb536 Timestamp: 2026-07-25 04:31:34Z - Correlation ID: 99250d46-b434-4bc0-9ce2-c9e8d26bb536 - Trace ID: 4ddeea5f-3a82-4691-985c-5a49e95b3600
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)