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

Function getErrorOptions

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

Source from the content-addressed store, hash-verified

9267 (options?.excludeCause === true ? 2 : 0)) as ErrorOptionsKey
9268
9269const getErrorOptions = (key: ErrorOptionsKey): NormalizedErrorOptions | undefined => {
9270 switch (key) {
9271 case 0:
9272 return undefined
9273 case 1:
9274 return { includeStack: true }
9275 case 2:
9276 return { excludeCause: true }
9277 case 3:
9278 return { includeStack: true, excludeCause: true }
9279 }
9280}
9281
9282const errorSchemaCache: Array<ErrorInstance | undefined> = []
9283/**

Callers 2

ErrorInstanceFunction · 0.85
DefectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected