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

Function getError

packages/effect/src/http-api/HttpApiMiddleware.ts:408–411  ·  view source on GitHub ↗
(error: ErrorConstraint | undefined)

Source from the content-addressed store, hash-verified

406}
407
408function getError(error: ErrorConstraint | undefined): ReadonlySet<Schema.Top> {
409 if (error === undefined) return new Set()
410 return new Set(Array.isArray(error) ? error : [error])
411}
412
413/**
414 * Creates a middleware layer that transforms `HttpApiSchemaError` failures.

Callers 1

ServiceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected