Defjs
Core

FaultOf

Any failure returned by an operation, expressed by its decoded error-body type.

@defjs/core · Type

Signature

type FaultOf<TData = undefined> =
  DecodeFault | HttpStatusFaultOf<TData> | PreflightFault;

Fault<TErr> is FaultOf applied to Infer<TErr>, and HttpAwaitResult uses FaultOf<TErrorData>. Pass a decoded type, not a struct: write FaultOf<Infer<typeof errorStruct>>, or use Fault<typeof errorStruct>.

Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao