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-07 07:53:29Z]: 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: 58050d97-2108-4111-a0fc-6effb5362f00 Correlation ID: 9d5721c9-8872-4c66-b7b7-96baea376391 Timestamp: 2026-02-07 07:53:29Z - Correlation ID: 9d5721c9-8872-4c66-b7b7-96baea376391 - Trace ID: 58050d97-2108-4111-a0fc-6effb5362f00
(node:1880) [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-07 07:53:29Z]: 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: df8f8f14-19c8-41c4-8766-776f330e4500 Correlation ID: 217bc6d3-3c28-4cb9-afdc-86fa2483d471 Timestamp: 2026-02-07 07:53:29Z - Correlation ID: 217bc6d3-3c28-4cb9-afdc-86fa2483d471 - Trace ID: df8f8f14-19c8-41c4-8766-776f330e4500
Error getting the secret: invalid_client: 7000222 - [2026-02-07 07:53:29Z]: 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: d5aa42c0-1ada-4d3e-9965-4d9449ed2700 Correlation ID: 11ef4576-cfba-417f-bb00-80d2d6af6998 Timestamp: 2026-02-07 07:53:29Z - Correlation ID: 11ef4576-cfba-417f-bb00-80d2d6af6998 - Trace ID: d5aa42c0-1ada-4d3e-9965-4d9449ed2700
Error getting the secret: invalid_client: 7000222 - [2026-02-07 07:53:29Z]: 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: bfe4a1bc-3426-4d72-92e3-6c63ad441200 Correlation ID: 55bfdb50-c972-41bc-9d1a-f1033c3cf454 Timestamp: 2026-02-07 07:53:29Z - Correlation ID: 55bfdb50-c972-41bc-9d1a-f1033c3cf454 - Trace ID: bfe4a1bc-3426-4d72-92e3-6c63ad441200
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)