Defjs
Core

HttpStatusFaultOf

Non-2xx fault expressed by its decoded body type instead of the struct that produced it.

@defjs/core · Type

Signature

type HttpStatusFaultOf<TData> = Error & {
  code: "HTTP_STATUS";
  data: TData;
  response: [TData] extends [undefined] ? HttpMeta : DecodedResponse<TData>;
  status: number;
};

Factories work in decoded values, so they use this form; endpoint types use HttpStatusFault and let Infer bridge the two. When TData is undefined, the body was never read and response is metadata alone.

Members

Prop

Type

code "HTTP_STATUS"
data TData
response [TData] extends [undefined] ? HttpMeta : DecodedResponse<TData>
status number
Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao