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-02-24 01:25:21Z]: 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: a8534501-6829-458a-a854-02dc96c15300 Correlation ID: ae0f2284-5fcc-417b-9090-4b21d0089d87 Timestamp: 2026-02-24 01:25:21Z - Correlation ID: ae0f2284-5fcc-417b-9090-4b21d0089d87 - Trace ID: a8534501-6829-458a-a854-02dc96c15300
(node:444) [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-02-24 01:25:21Z]: 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: 5b24bdda-f116-4b93-89d9-082944d33600 Correlation ID: 9d9a14d3-5cfe-4b88-b8c0-0df22ffcb74d Timestamp: 2026-02-24 01:25:21Z - Correlation ID: 9d9a14d3-5cfe-4b88-b8c0-0df22ffcb74d - Trace ID: 5b24bdda-f116-4b93-89d9-082944d33600
Error getting the secret: invalid_client: 7000222 - [2026-02-24 01:25:22Z]: 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: a8534501-6829-458a-a854-02dc9dc15300 Correlation ID: 87f7c895-e812-4941-8629-0b7e4ce62dd3 Timestamp: 2026-02-24 01:25:22Z - Correlation ID: 87f7c895-e812-4941-8629-0b7e4ce62dd3 - Trace ID: a8534501-6829-458a-a854-02dc9dc15300
Error getting the secret: invalid_client: 7000222 - [2026-02-24 01:25:22Z]: 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: 3aa37acc-735e-4af3-a82b-7f4457c97100 Correlation ID: ad859253-906c-46c2-a9b2-27e1105c22d6 Timestamp: 2026-02-24 01:25:22Z - Correlation ID: ad859253-906c-46c2-a9b2-27e1105c22d6 - Trace ID: 3aa37acc-735e-4af3-a82b-7f4457c97100
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)