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-19 16:25:13Z]: 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: f4c1c6a3-5d8b-4403-a505-b0d32c092500 Correlation ID: ccbb7296-1b69-4350-b4e3-5b441005ebbd Timestamp: 2026-04-19 16:25:13Z - Correlation ID: ccbb7296-1b69-4350-b4e3-5b441005ebbd - Trace ID: f4c1c6a3-5d8b-4403-a505-b0d32c092500
(node:5720) [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-19 16:25:13Z]: 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: d0dcd1e0-438e-4b77-84a6-6e0f4ea60e00 Correlation ID: facdf4c3-2586-4402-9550-cbd04e0851dd Timestamp: 2026-04-19 16:25:13Z - Correlation ID: facdf4c3-2586-4402-9550-cbd04e0851dd - Trace ID: d0dcd1e0-438e-4b77-84a6-6e0f4ea60e00
Error getting the secret: invalid_client: 7000222 - [2026-04-19 16:25:13Z]: 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: 3218bdb0-f194-4404-88b4-64c2b7553200 Correlation ID: 5d872080-5bba-4815-a2a8-45133d20de73 Timestamp: 2026-04-19 16:25:13Z - Correlation ID: 5d872080-5bba-4815-a2a8-45133d20de73 - Trace ID: 3218bdb0-f194-4404-88b4-64c2b7553200
Error getting the secret: invalid_client: 7000222 - [2026-04-19 16:25:14Z]: 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: e0186787-523f-4b7e-b14a-9ce3e4e02200 Correlation ID: 9394d00f-9aa2-4a91-9e80-e37980a3e73f Timestamp: 2026-04-19 16:25:14Z - Correlation ID: 9394d00f-9aa2-4a91-9e80-e37980a3e73f - Trace ID: e0186787-523f-4b7e-b14a-9ce3e4e02200
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)