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

Function getError

packages/effect/src/unstable/httpapi/HttpApiMiddleware.ts:381–384  ·  view source on GitHub ↗
(error: ErrorConstraint | undefined)

Source from the content-addressed store, hash-verified

379}
380
381function getError(error: ErrorConstraint | undefined): ReadonlySet<Schema.Top> {
382 if (error === undefined) return new Set()
383 return new Set(Array.isArray(error) ? error : [error])
384}
385
386/**
387 * Creates a middleware layer that transforms `HttpApiSchemaError` failures.

Callers 1

ServiceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected