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 03:06:22Z]: 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: 1a474632-c964-4d3a-8f80-197037782300 Correlation ID: c927a6a1-374e-419e-839b-f9a8280e914a Timestamp: 2026-04-11 03:06:22Z - Correlation ID: c927a6a1-374e-419e-839b-f9a8280e914a - Trace ID: 1a474632-c964-4d3a-8f80-197037782300
(node:4872) [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 03:06:22Z]: 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: 40e7924f-f142-46bd-aac2-c3f715370900 Correlation ID: 21d5affe-8eec-4da5-ae28-e8327a351999 Timestamp: 2026-04-11 03:06:22Z - Correlation ID: 21d5affe-8eec-4da5-ae28-e8327a351999 - Trace ID: 40e7924f-f142-46bd-aac2-c3f715370900
Error getting the secret: invalid_client: 7000222 - [2026-04-11 03:06:22Z]: 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: 6fca5b3d-ebac-4435-85c8-3da0b5530600 Correlation ID: 517b60cd-635c-44fb-b197-cc9d1d6aaddb Timestamp: 2026-04-11 03:06:22Z - Correlation ID: 517b60cd-635c-44fb-b197-cc9d1d6aaddb - Trace ID: 6fca5b3d-ebac-4435-85c8-3da0b5530600
Error getting the secret: invalid_client: 7000222 - [2026-04-11 03:06:22Z]: 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: 93143e9a-4b14-46db-b96d-77b1b85b0700 Correlation ID: 6af474d3-c24b-43db-b18f-2e8a1646f989 Timestamp: 2026-04-11 03:06:22Z - Correlation ID: 6af474d3-c24b-43db-b18f-2e8a1646f989 - Trace ID: 93143e9a-4b14-46db-b96d-77b1b85b0700
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)