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

Function getErrorOptions

packages/effect/src/Schema.ts:10639–10650  ·  view source on GitHub ↗
(key: ErrorOptionsKey)

Source from the content-addressed store, hash-verified

10637 (options?.excludeCause === true ? 2 : 0)) as ErrorOptionsKey
10638
10639const getErrorOptions = (key: ErrorOptionsKey): NormalizedErrorOptions | undefined => {
10640 switch (key) {
10641 case 0:
10642 return undefined
10643 case 1:
10644 return { includeStack: true }
10645 case 2:
10646 return { excludeCause: true }
10647 case 3:
10648 return { includeStack: true, excludeCause: true }
10649 }
10650}
10651
10652const errorSchemaCache: Array<ErrorInstance | undefined> = []
10653

Callers 2

ErrorInstanceFunction · 0.85
DefectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected