Hyperlinkv0.8.0-beta.28

Encoding

Encoding.EncodingErrorclasseffect/Encoding.ts:70
EncodingError

Error returned when an encoding or decoding operation cannot process its input.

When to use

Use when you need to handle or inspect failures from encoding or decoding operations.

Details

The error records whether the failure happened during encoding or decoding, which encoding module reported it, the original input, and a human-readable message.

constructorsisEncodingError
Source effect/Encoding.ts:7017 lines
export class EncodingError extends Data.TaggedError("EncodingError")<{
  kind: "Decode" | "Encode"
  module: string
  input: unknown
  message: string
}> {
  /**
   * Marks this value as an encoding or decoding error for runtime guards.
   *
   * **When to use**
   *
   * Use to identify `EncodingError` instances through `isEncodingError`.
   *
   * @since 4.0.0
   */
  readonly [EncodingErrorTypeId]: EncodingErrorTypeId = EncodingErrorTypeId
}
Referenced by 4 symbols