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-12-01 11:40:16Z]: 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: 231af376-1143-4758-a34b-5b5efd1b7600 Correlation ID: f160cdc0-23d0-450b-a5ab-74a0143a27db Timestamp: 2026-12-01 11:40:16Z - Correlation ID: f160cdc0-23d0-450b-a5ab-74a0143a27db - Trace ID: 231af376-1143-4758-a34b-5b5efd1b7600
(node:6416) [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-12-01 11:40:16Z]: 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: 668e4617-6eee-4386-ad1a-368ced798700 Correlation ID: 93fb404f-211f-4854-947b-0b9d7d08bc01 Timestamp: 2026-12-01 11:40:16Z - Correlation ID: 93fb404f-211f-4854-947b-0b9d7d08bc01 - Trace ID: 668e4617-6eee-4386-ad1a-368ced798700
Error getting the secret: invalid_client: 7000222 - [2026-12-01 11:40:16Z]: 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: 31d14498-fa28-4554-97c7-4c52ce586f00 Correlation ID: 993329f4-d5e8-4521-8e83-30651b8e9f6b Timestamp: 2026-12-01 11:40:16Z - Correlation ID: 993329f4-d5e8-4521-8e83-30651b8e9f6b - Trace ID: 31d14498-fa28-4554-97c7-4c52ce586f00
Error getting the secret: invalid_client: 7000222 - [2026-12-01 11:40:17Z]: 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: 31d14498-fa28-4554-97c7-4c52d3586f00 Correlation ID: a7606a25-b1bb-4106-9f4b-bf1b9ae0176b Timestamp: 2026-12-01 11:40:17Z - Correlation ID: a7606a25-b1bb-4106-9f4b-bf1b9ae0176b - Trace ID: 31d14498-fa28-4554-97c7-4c52d3586f00
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)