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-21 20:25: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: da41363a-d679-497c-b3a5-e427aa381a00 Correlation ID: 5bbf70fd-4a76-4956-9bdc-d4873d725e17 Timestamp: 2026-07-21 20:25:02Z - Correlation ID: 5bbf70fd-4a76-4956-9bdc-d4873d725e17 - Trace ID: da41363a-d679-497c-b3a5-e427aa381a00
(node:5340) [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-21 20:25: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: 27d58344-3766-4700-a885-3a12c5ce1600 Correlation ID: 1e69bd42-ddf5-46b4-8e62-4d805c209c6a Timestamp: 2026-07-21 20:25:02Z - Correlation ID: 1e69bd42-ddf5-46b4-8e62-4d805c209c6a - Trace ID: 27d58344-3766-4700-a885-3a12c5ce1600
Error getting the secret: invalid_client: 7000222 - [2026-07-21 20:25: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: 27d58344-3766-4700-a885-3a12cece1600 Correlation ID: d58160ef-8e3e-4dc7-899c-d3472ce8a5bf Timestamp: 2026-07-21 20:25:02Z - Correlation ID: d58160ef-8e3e-4dc7-899c-d3472ce8a5bf - Trace ID: 27d58344-3766-4700-a885-3a12cece1600
Error getting the secret: invalid_client: 7000222 - [2026-07-21 20:25: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: 8404d07d-f535-47cf-b11d-a1d818651900 Correlation ID: b1829a03-b7cb-49dd-8392-7f15e5b91cb8 Timestamp: 2026-07-21 20:25:03Z - Correlation ID: b1829a03-b7cb-49dd-8392-7f15e5b91cb8 - Trace ID: 8404d07d-f535-47cf-b11d-a1d818651900
Error getting the secret: invalid_client: 7000222 - [2026-07-21 20:25: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: 8404d07d-f535-47cf-b11d-a1d81c651900 Correlation ID: 4f7c6d1b-a5f6-411c-b1c2-a5ce0e5fd540 Timestamp: 2026-07-21 20:25:03Z - Correlation ID: 4f7c6d1b-a5f6-411c-b1c2-a5ce0e5fd540 - Trace ID: 8404d07d-f535-47cf-b11d-a1d81c651900
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)