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-11 06:39:58Z]: 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: c29e4381-84b8-41b6-aa33-608e69970b00 Correlation ID: aa0d8c23-cb06-454f-96d9-09738e012673 Timestamp: 2026-04-11 06:39:58Z - Correlation ID: aa0d8c23-cb06-454f-96d9-09738e012673 - Trace ID: c29e4381-84b8-41b6-aa33-608e69970b00
(node:1832) [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-11 06:39:58Z]: 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: ae9d1246-ab4c-4696-a6ca-1410a7fb0900 Correlation ID: 5ff6ddbf-7c8f-4e20-a956-02808374d6db Timestamp: 2026-04-11 06:39:58Z - Correlation ID: 5ff6ddbf-7c8f-4e20-a956-02808374d6db - Trace ID: ae9d1246-ab4c-4696-a6ca-1410a7fb0900
Error getting the secret: invalid_client: 7000222 - [2026-04-11 06:39:59Z]: 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: c4c44b84-9ca5-4179-91cf-7af551260600 Correlation ID: cc941c44-abd1-46f0-80b9-3cc36e8411d3 Timestamp: 2026-04-11 06:39:59Z - Correlation ID: cc941c44-abd1-46f0-80b9-3cc36e8411d3 - Trace ID: c4c44b84-9ca5-4179-91cf-7af551260600
Error getting the secret: invalid_client: 7000222 - [2026-04-11 06:39:59Z]: 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: 8d8ece49-8d53-4f5a-8690-d5e5b4eb0800 Correlation ID: f7ed9929-866e-4863-ad3b-a2b0cc03b283 Timestamp: 2026-04-11 06:39:59Z - Correlation ID: f7ed9929-866e-4863-ad3b-a2b0cc03b283 - Trace ID: 8d8ece49-8d53-4f5a-8690-d5e5b4eb0800
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)