MCPcopy
hub / github.com/langgenius/dify / orpcClient

Function orpcClient

cli/src/http/orpc.test.ts:14–18  ·  view source on GitHub ↗
(host: string)

Source from the content-addressed store, hash-verified

12// SAME classified HttpClientError as the `this.http.*` path — Dify's message/hint, the request
13// method/url, and the raw body — straight from a plain `orpc.x()` call, with no per-call wrapper.
14function orpcClient(host: string) {
15 // retryAttempts: 0 so the 5xx case fails fast instead of burning the backoff budget.
16 const http = createHttpClient({ baseURL: openAPIBase(host), bearer: 'dfoa_test', retryAttempts: 0 })
17 return createOpenApiClient(http)
18}
19
20async function catchErr(run: () => Promise<unknown>): Promise<unknown> {
21 try {

Callers 1

classifiedErrorFunction · 0.85

Calls 3

createHttpClientFunction · 0.90
openAPIBaseFunction · 0.90
createOpenApiClientFunction · 0.85

Tested by

no test coverage detected