MCPcopy Create free account
hub / github.com/Effect-TS/effect / decodeError

Function decodeError

packages/ai/openai/src/Generated.ts:18865–18870  ·  view source on GitHub ↗
(tag: Tag, schema: S.Schema<A, I, R>)

Source from the content-addressed store, hash-verified

18863 HttpClientResponse.schemaBodyJson(schema)(response)
18864 const decodeError =
18865 <const Tag extends string, A, I, R>(tag: Tag, schema: S.Schema<A, I, R>) =>
18866 (response: HttpClientResponse.HttpClientResponse) =>
18867 Effect.flatMap(
18868 HttpClientResponse.schemaBodyJson(schema)(response),
18869 (cause) => Effect.fail(ClientError(tag, cause, response))
18870 )
18871 return {
18872 httpClient,
18873 "listAssistants": (options) =>

Callers 1

makeFunction · 0.70

Calls 2

ClientErrorFunction · 0.70
failMethod · 0.65

Tested by

no test coverage detected