Creates an instance of KindError.
The error message.
Optionalkind: string = Errors.UnknownThe kind of error. This will be combined with
prefix to form the name of the error, i.e. PrefixKindError.
Defaults to Errors.Unknown.
Optionaloptions: Options = ...Options for constructing the error.
The error that caused this error.
The metadata to attach to the error.
A prefix to prepend the name of the error.
The name of the error.
The number of stack frames to remove from the error's stack. This can be used to ensure that the top call of the stack references the point at which an error is thrown which can be useful when helper functions are used to build the error being thrown.
The minimum number of stack frames to try and retain. This can be used to prevent stripping all stack frames from the error's stack.
Should we build a composite stack from the causal error chain or not?
ReadonlycauseReadonlykindReadonlymetadataReadonlyoriginalReadonlyoriginalOptionalstackStatic OptionalprepareOptional override for formatting stack traces
Staticstack
An error to describe detailed states and relationships.
This error type supports error taxonomies and attachment of metadata, as well as causal relationships between itself and another source error. More specific variations can be built off this to provide a payload for logging setups like Sentry or winston.