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 HttpMetaMetadata of the response; no body was read.
Returns
An HTTP_STATUS fault whose data is undefined.