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-04-27 03:55:57Z]: 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: fe7fabf8-167d-41ca-b218-54c31e4f6300 Correlation ID: 821d433b-15ad-4d0b-bdab-bcdeac2c6da1 Timestamp: 2026-04-27 03:55:57Z - Correlation ID: 821d433b-15ad-4d0b-bdab-bcdeac2c6da1 - Trace ID: fe7fabf8-167d-41ca-b218-54c31e4f6300
(node:3212) [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-04-27 03:55:57Z]: 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: c9bfd39e-6131-4a01-8ff2-22bd87a33200 Correlation ID: 2d18fbf0-530e-43ea-b931-447ad40e112a Timestamp: 2026-04-27 03:55:57Z - Correlation ID: 2d18fbf0-530e-43ea-b931-447ad40e112a - Trace ID: c9bfd39e-6131-4a01-8ff2-22bd87a33200
Error getting the secret: invalid_client: 7000222 - [2026-04-27 03:55:57Z]: 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: 71e96651-cc0b-433b-8b8e-53ec324e3100 Correlation ID: 24ccd610-2c06-4bb3-b7bf-511f1a95795a Timestamp: 2026-04-27 03:55:57Z - Correlation ID: 24ccd610-2c06-4bb3-b7bf-511f1a95795a - Trace ID: 71e96651-cc0b-433b-8b8e-53ec324e3100
Error getting the secret: invalid_client: 7000222 - [2026-04-27 03:55:58Z]: 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: 4a869291-6f60-4052-8ac9-bdc37d2b5200 Correlation ID: e88263d0-2371-416b-adff-1f65a6b77b47 Timestamp: 2026-04-27 03:55:58Z - Correlation ID: e88263d0-2371-416b-adff-1f65a6b77b47 - Trace ID: 4a869291-6f60-4052-8ac9-bdc37d2b5200
Error getting the secret: invalid_client: 7000222 - [2026-04-27 03:55:58Z]: 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: 4a869291-6f60-4052-8ac9-bdc37f2b5200 Correlation ID: 0dd39f7c-d12b-4f7f-86fd-38a37431f503 Timestamp: 2026-04-27 03:55:58Z - Correlation ID: 0dd39f7c-d12b-4f7f-86fd-38a37431f503 - Trace ID: 4a869291-6f60-4052-8ac9-bdc37f2b5200
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)