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-05-05 10:42:46Z]: 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: dc317ffc-40db-43cc-847a-b7da55f60e00 Correlation ID: 2a256c19-8c38-484b-93eb-3ee3d9639c1f Timestamp: 2026-05-05 10:42:46Z - Correlation ID: 2a256c19-8c38-484b-93eb-3ee3d9639c1f - Trace ID: dc317ffc-40db-43cc-847a-b7da55f60e00
(node:1300) [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-05-05 10:42:46Z]: 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: b5355735-b446-4fdb-8f6a-6878518c6100 Correlation ID: 026d34c5-760c-45a9-bfaf-d7d385d91172 Timestamp: 2026-05-05 10:42:46Z - Correlation ID: 026d34c5-760c-45a9-bfaf-d7d385d91172 - Trace ID: b5355735-b446-4fdb-8f6a-6878518c6100
Error getting the secret: invalid_client: 7000222 - [2026-05-05 10:42:46Z]: 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: b30474bd-ff1d-40e1-bf99-a23ab4101300 Correlation ID: 1715570c-9753-4c8c-a7eb-ed054c3b6cad Timestamp: 2026-05-05 10:42:46Z - Correlation ID: 1715570c-9753-4c8c-a7eb-ed054c3b6cad - Trace ID: b30474bd-ff1d-40e1-bf99-a23ab4101300
Error getting the secret: invalid_client: 7000222 - [2026-05-05 10:42:46Z]: 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: 02e0d22e-a837-48e6-8a99-ae1e7b908400 Correlation ID: b39db406-e255-45f9-83f9-1d1a4205eb72 Timestamp: 2026-05-05 10:42:46Z - Correlation ID: b39db406-e255-45f9-83f9-1d1a4205eb72 - Trace ID: 02e0d22e-a837-48e6-8a99-ae1e7b908400
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)