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-01-29 13:32:10Z]: 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: 6390d50b-58d1-452a-9d1f-ece8e7c24400 Correlation ID: 61d46b88-6538-49bc-8fba-dceca8f46cf4 Timestamp: 2026-01-29 13:32:10Z - Correlation ID: 61d46b88-6538-49bc-8fba-dceca8f46cf4 - Trace ID: 6390d50b-58d1-452a-9d1f-ece8e7c24400
(node:5016) [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-01-29 13:32:11Z]: 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: f6619e3e-6d89-47a8-ad03-2752f10a0500 Correlation ID: 4c8832dd-756b-43e2-b2a3-b38978249ca5 Timestamp: 2026-01-29 13:32:11Z - Correlation ID: 4c8832dd-756b-43e2-b2a3-b38978249ca5 - Trace ID: f6619e3e-6d89-47a8-ad03-2752f10a0500
Error getting the secret: invalid_client: 7000222 - [2026-01-29 13:32:11Z]: 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: 6d15b543-089d-493d-905e-cc9d9cbc1a00 Correlation ID: 6aaf0c29-6b61-4360-9bd0-65cf3bd9d40d Timestamp: 2026-01-29 13:32:11Z - Correlation ID: 6aaf0c29-6b61-4360-9bd0-65cf3bd9d40d - Trace ID: 6d15b543-089d-493d-905e-cc9d9cbc1a00
Error getting the secret: invalid_client: 7000222 - [2026-01-29 13:32:11Z]: 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: 7c3f1af6-646c-4895-8661-f09c85240d00 Correlation ID: 50267ba2-f461-4f39-810b-12c1cba6c0e3 Timestamp: 2026-01-29 13:32:11Z - Correlation ID: 50267ba2-f461-4f39-810b-12c1cba6c0e3 - Trace ID: 7c3f1af6-646c-4895-8661-f09c85240d00
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'cosdb')
    at C:\stop_order_dev\server.js:25:30
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)