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

Function decodeError

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

Source from the content-addressed store, hash-verified

5109 HttpClientResponse.schemaBodyJson(schema)(response)
5110 const decodeError =
5111 <const Tag extends string, A, I, R>(tag: Tag, schema: S.Schema<A, I, R>) =>
5112 (response: HttpClientResponse.HttpClientResponse) =>
5113 Effect.flatMap(
5114 HttpClientResponse.schemaBodyJson(schema)(response),
5115 (cause) => Effect.fail(ClientError(tag, cause, response))
5116 )
5117 return {
5118 httpClient,
5119 "createResponses": (options) =>

Callers 1

makeFunction · 0.70

Calls 2

ClientErrorFunction · 0.70
failMethod · 0.65

Tested by

no test coverage detected