Defjs
Core

createUndecodedHttpStatusFault

Builds an HTTP_STATUS fault for a non-2xx response that was never decoded, because the endpoint declared no error struct.

@defjs/core · Function

Signature

function createUndecodedHttpStatusFault(
  response: HttpMeta,
): HttpStatusFaultOf<undefined>;

The fault is a native Error named DefjsFault with code: 'HTTP_STATUS', data: undefined, status copied from the response, and response as passed.

Use createHttpStatusFault when the body was decoded.

Parameters

Prop

Type

response HttpMeta

Metadata of the response; no body was read.

Returns

An HTTP_STATUS fault whose data is undefined.

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