Defjs
Core

DecodeFault

A response arrived but could not be read as declared.

@defjs/core · Type

Signature

type DecodeFault = Error & {
  cause: unknown;
  code: DecodeFaultCode;
  response: HttpMeta;
  status: number;
};

code is one of RES_DECODE_FAILED, RES_MEDIA_TYPE_INVALID, or RES_STRUCT_MISMATCH. response is metadata only: a body is a decoded value, and decoding is what failed, so there is no body field to reach for. The offending detail lives on cause (a StructError for a struct mismatch, the parser failure for an unreadable representation).

Members

Prop

Type

code DecodeFaultCode
response HttpMeta
status number
Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao