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-03-28 01:22:37Z]: 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: 176605ce-6d22-4f6d-a7f8-3f79ddf53e00 Correlation ID: aac4c6e1-62e0-4a3a-ac4d-a8e5724d3b0e Timestamp: 2026-03-28 01:22:37Z - Correlation ID: aac4c6e1-62e0-4a3a-ac4d-a8e5724d3b0e - Trace ID: 176605ce-6d22-4f6d-a7f8-3f79ddf53e00
(node:5936) [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-03-28 01:22:37Z]: 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: 077464d8-ffc2-4447-9cba-a2c88d104500 Correlation ID: 669a2cff-8c8f-4699-9e2b-8594e6eef851 Timestamp: 2026-03-28 01:22:37Z - Correlation ID: 669a2cff-8c8f-4699-9e2b-8594e6eef851 - Trace ID: 077464d8-ffc2-4447-9cba-a2c88d104500
Error getting the secret: invalid_client: 7000222 - [2026-03-28 01:22:37Z]: 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: e22314d6-5edb-4451-bed7-07a46b341600 Correlation ID: 28d2da92-54ad-4ac8-84bb-b5c63ea843c6 Timestamp: 2026-03-28 01:22:37Z - Correlation ID: 28d2da92-54ad-4ac8-84bb-b5c63ea843c6 - Trace ID: e22314d6-5edb-4451-bed7-07a46b341600
Error getting the secret: invalid_client: 7000222 - [2026-03-28 01:22:37Z]: 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: d4091b52-d758-4456-a723-6d8df6651400 Correlation ID: b055ed26-a454-4d3a-a25d-8c584651048c Timestamp: 2026-03-28 01:22:37Z - Correlation ID: b055ed26-a454-4d3a-a25d-8c584651048c - Trace ID: d4091b52-d758-4456-a723-6d8df6651400
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)