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-10-05 06:12:08Z]: 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: 2a5f2ba5-8419-4979-8a1f-b5e9ce9e3100 Correlation ID: efa1118b-ec16-458f-aabc-5f65a6969293 Timestamp: 2026-10-05 06:12:08Z - Correlation ID: efa1118b-ec16-458f-aabc-5f65a6969293 - Trace ID: 2a5f2ba5-8419-4979-8a1f-b5e9ce9e3100
(node:1624) [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-10-05 06:12:09Z]: 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: 8c786b01-bd6d-4eb3-a2bd-448b47590c01 Correlation ID: 101bee41-4bd7-419f-a325-57fc99a00376 Timestamp: 2026-10-05 06:12:09Z - Correlation ID: 101bee41-4bd7-419f-a325-57fc99a00376 - Trace ID: 8c786b01-bd6d-4eb3-a2bd-448b47590c01
Error getting the secret: invalid_client: 7000222 - [2026-10-05 06:12:09Z]: 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: bcf2499d-d886-4a75-8515-91532d569700 Correlation ID: f0868b30-871e-475f-bf99-410ddda5c8aa Timestamp: 2026-10-05 06:12:09Z - Correlation ID: f0868b30-871e-475f-bf99-410ddda5c8aa - Trace ID: bcf2499d-d886-4a75-8515-91532d569700
Error getting the secret: invalid_client: 7000222 - [2026-10-05 06:12:09Z]: 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: 0c38e818-02aa-4602-aaaf-f9bc9241d100 Correlation ID: a3497515-2e83-4f39-a52c-149f70fc3562 Timestamp: 2026-10-05 06:12:09Z - Correlation ID: a3497515-2e83-4f39-a52c-149f70fc3562 - Trace ID: 0c38e818-02aa-4602-aaaf-f9bc9241d100
Error getting the secret: invalid_client: 7000222 - [2026-10-05 06:12:09Z]: 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: ba626e92-8c39-41c4-8cc6-92b059bf2201 Correlation ID: 00c318a9-1402-47fd-ad11-c21a6f622c20 Timestamp: 2026-10-05 06:12:09Z - Correlation ID: 00c318a9-1402-47fd-ad11-c21a6f622c20 - Trace ID: ba626e92-8c39-41c4-8cc6-92b059bf2201
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)