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-04-27 12:11: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: ae169679-f926-4389-9ef0-a34832503a00 Correlation ID: 2c9c67e5-7ca9-4043-bd2b-8bc5b9baa571 Timestamp: 2026-04-27 12:11:10Z - Correlation ID: 2c9c67e5-7ca9-4043-bd2b-8bc5b9baa571 - Trace ID: ae169679-f926-4389-9ef0-a34832503a00
(node:1192) [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-04-27 12:11: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: 559e1ad1-ffe8-48e9-84ed-53d99b023900 Correlation ID: 28da8d11-a607-4567-92cb-44d220e27be1 Timestamp: 2026-04-27 12:11:10Z - Correlation ID: 28da8d11-a607-4567-92cb-44d220e27be1 - Trace ID: 559e1ad1-ffe8-48e9-84ed-53d99b023900
Error getting the secret: invalid_client: 7000222 - [2026-04-27 12:11: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: 6079a7ac-fa2c-4f2a-8694-7cf159265c00 Correlation ID: 13d2b098-6ff2-4a0e-bfdf-4eda5d92a743 Timestamp: 2026-04-27 12:11:10Z - Correlation ID: 13d2b098-6ff2-4a0e-bfdf-4eda5d92a743 - Trace ID: 6079a7ac-fa2c-4f2a-8694-7cf159265c00
Error getting the secret: invalid_client: 7000222 - [2026-04-27 12:11: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: b850b116-0ca8-4631-8866-5c7a2e130200 Correlation ID: 2e9701fb-c5a9-4b70-8a90-41e6421fd912 Timestamp: 2026-04-27 12:11:10Z - Correlation ID: 2e9701fb-c5a9-4b70-8a90-41e6421fd912 - Trace ID: b850b116-0ca8-4631-8866-5c7a2e130200
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)