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-23 16:07:21Z]: 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: 77189991-1e66-4d74-835c-e49f41de1200 Correlation ID: 1ebe990c-3c1d-4a24-8270-6ffb780ec0da Timestamp: 2026-04-23 16:07:21Z - Correlation ID: 1ebe990c-3c1d-4a24-8270-6ffb780ec0da - Trace ID: 77189991-1e66-4d74-835c-e49f41de1200
(node:1720) [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-23 16:07: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: c68c01b3-5d08-4a04-9299-a51cd4214600 Correlation ID: 91e5d7cc-22d0-4b83-83b6-6c132c22f1cb Timestamp: 2026-04-23 16:07:22Z - Correlation ID: 91e5d7cc-22d0-4b83-83b6-6c132c22f1cb - Trace ID: c68c01b3-5d08-4a04-9299-a51cd4214600
Error getting the secret: invalid_client: 7000222 - [2026-04-23 16:07: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: eec70733-6c54-4c8e-a97f-b1f652b88900 Correlation ID: 5cb8c958-39f1-4534-a2ee-9c38b0253093 Timestamp: 2026-04-23 16:07:22Z - Correlation ID: 5cb8c958-39f1-4534-a2ee-9c38b0253093 - Trace ID: eec70733-6c54-4c8e-a97f-b1f652b88900
Error getting the secret: invalid_client: 7000222 - [2026-04-23 16:07: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: b4299af7-5992-4813-8679-3b5f6e097e00 Correlation ID: ff305e42-c610-4283-b3e4-9f2751027f94 Timestamp: 2026-04-23 16:07:22Z - Correlation ID: ff305e42-c610-4283-b3e4-9f2751027f94 - Trace ID: b4299af7-5992-4813-8679-3b5f6e097e00
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)