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-23 12:28:55Z]: 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: 83f4704f-b964-4749-b8c3-0853364e0e00 Correlation ID: 9b033bbf-2b8f-4da3-9b67-96ce6ce63c0d Timestamp: 2026-07-23 12:28:55Z - Correlation ID: 9b033bbf-2b8f-4da3-9b67-96ce6ce63c0d - Trace ID: 83f4704f-b964-4749-b8c3-0853364e0e00
(node:6044) [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-23 12:28:55Z]: 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: 83f4704f-b964-4749-b8c3-08533c4e0e00 Correlation ID: 76668416-88d7-4999-9900-e5bc155eb01e Timestamp: 2026-07-23 12:28:55Z - Correlation ID: 76668416-88d7-4999-9900-e5bc155eb01e - Trace ID: 83f4704f-b964-4749-b8c3-08533c4e0e00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 12:28:56Z]: 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: 83f4704f-b964-4749-b8c3-0853454e0e00 Correlation ID: ef3a5f7f-2cf8-49f2-a593-ef0679e2cb2a Timestamp: 2026-07-23 12:28:56Z - Correlation ID: ef3a5f7f-2cf8-49f2-a593-ef0679e2cb2a - Trace ID: 83f4704f-b964-4749-b8c3-0853454e0e00
Error getting the secret: invalid_client: 7000222 - [2026-07-23 12:28:56Z]: 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: d457b8a3-8046-47a5-af70-e1614b9b3100 Correlation ID: 73694b76-a7a8-42aa-b516-538ae0cd9d6e Timestamp: 2026-07-23 12:28:56Z - Correlation ID: 73694b76-a7a8-42aa-b516-538ae0cd9d6e - Trace ID: d457b8a3-8046-47a5-af70-e1614b9b3100
Error getting the secret: invalid_client: 7000222 - [2026-07-23 12:28:56Z]: 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: 3557afd4-2365-46be-bba7-6d81b2216900 Correlation ID: 4ceaef6a-93ec-4f94-a18c-cc16666de874 Timestamp: 2026-07-23 12:28:56Z - Correlation ID: 4ceaef6a-93ec-4f94-a18c-cc16666de874 - Trace ID: 3557afd4-2365-46be-bba7-6d81b2216900
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)