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-26 18:27:50Z]: 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: cce7b6fa-394e-4cc8-ab29-6f05fc414b00 Correlation ID: 3c6a9cc4-c280-481c-8998-90d23f7ba251 Timestamp: 2026-07-26 18:27:50Z - Correlation ID: 3c6a9cc4-c280-481c-8998-90d23f7ba251 - Trace ID: cce7b6fa-394e-4cc8-ab29-6f05fc414b00
(node:2884) [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-26 18:27:50Z]: 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: b282077b-2be4-4a47-9851-703ebd151b00 Correlation ID: 1d4a93cd-e815-481a-8fc8-587d30dcca59 Timestamp: 2026-07-26 18:27:50Z - Correlation ID: 1d4a93cd-e815-481a-8fc8-587d30dcca59 - Trace ID: b282077b-2be4-4a47-9851-703ebd151b00
Error getting the secret: invalid_client: 7000222 - [2026-07-26 18:27:50Z]: 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: 7105d4e7-9de0-423a-8b88-c875bac32000 Correlation ID: fba52a3f-7ee8-49cb-9ac1-3c7e4af6d5d2 Timestamp: 2026-07-26 18:27:50Z - Correlation ID: fba52a3f-7ee8-49cb-9ac1-3c7e4af6d5d2 - Trace ID: 7105d4e7-9de0-423a-8b88-c875bac32000
Error getting the secret: invalid_client: 7000222 - [2026-07-26 18:27:50Z]: 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: ccb14333-5604-404a-b749-7fcd3cab1700 Correlation ID: bf035135-bfa9-44bf-bd8c-05dd07859840 Timestamp: 2026-07-26 18:27:50Z - Correlation ID: bf035135-bfa9-44bf-bd8c-05dd07859840 - Trace ID: ccb14333-5604-404a-b749-7fcd3cab1700
Error getting the secret: invalid_client: 7000222 - [2026-07-26 18:27:51Z]: 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: 6fd4c047-8734-45e0-b143-308306b71e00 Correlation ID: 23fa329f-26c0-4125-bd87-75d4478926f2 Timestamp: 2026-07-26 18:27:51Z - Correlation ID: 23fa329f-26c0-4125-bd87-75d4478926f2 - Trace ID: 6fd4c047-8734-45e0-b143-308306b71e00
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)