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

Function runSchemaErrorPromise

packages/effect/src/Schema.ts:1571–1580  ·  view source on GitHub ↗
(
  self: Effect.Effect<A, SchemaError>
)

Source from the content-addressed store, hash-verified

1569}
1570
1571function runSchemaErrorPromise<A>(
1572 self: Effect.Effect<A, SchemaError>
1573): Promise<A> {
1574 return Effect.runPromiseExit(self).then((exit) => {
1575 if (Exit_.isSuccess(exit)) {
1576 return exit.value
1577 }
1578 throw getSchemaErrorOrThrow(exit.cause, "Promise adapter can only reject schema errors")
1579 })
1580}
1581
1582function runSchemaErrorSync<A>(
1583 self: Effect.Effect<A, SchemaError>

Callers 2

decodeUnknownPromiseFunction · 0.85
encodeUnknownPromiseFunction · 0.85

Calls 1

getSchemaErrorOrThrowFunction · 0.85

Tested by

no test coverage detected