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-02-23 10:26:12Z]: 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: fae95f01-4d7e-42e0-b51f-ad6b20745700 Correlation ID: d9e4726e-101d-4e86-a64f-53ad265af6a7 Timestamp: 2026-02-23 10:26:12Z - Correlation ID: d9e4726e-101d-4e86-a64f-53ad265af6a7 - Trace ID: fae95f01-4d7e-42e0-b51f-ad6b20745700
(node:700) [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-02-23 10:26:12Z]: 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: 6aa730fc-018d-489a-88c5-1489d76c5900 Correlation ID: 66519589-19e9-468f-aebe-b4e0958ccf68 Timestamp: 2026-02-23 10:26:12Z - Correlation ID: 66519589-19e9-468f-aebe-b4e0958ccf68 - Trace ID: 6aa730fc-018d-489a-88c5-1489d76c5900
Error getting the secret: invalid_client: 7000222 - [2026-02-23 10:26:12Z]: 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: 6aa730fc-018d-489a-88c5-1489dd6c5900 Correlation ID: a94d4df9-e9b0-488f-a334-6464fc42356b Timestamp: 2026-02-23 10:26:12Z - Correlation ID: a94d4df9-e9b0-488f-a334-6464fc42356b - Trace ID: 6aa730fc-018d-489a-88c5-1489dd6c5900
Error getting the secret: invalid_client: 7000222 - [2026-02-23 10:26:12Z]: 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: 93cf8cf1-3961-4911-bdd6-5c26100c6100 Correlation ID: f2e62854-8b4b-406d-a3ec-343176cdc071 Timestamp: 2026-02-23 10:26:12Z - Correlation ID: f2e62854-8b4b-406d-a3ec-343176cdc071 - Trace ID: 93cf8cf1-3961-4911-bdd6-5c26100c6100
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)