R
fn

createFetchError

v0.0.1

Builds a FetchError from a FetchContext, extracting URL, status, and error message

Signature

ts
export function createFetchError<T = unknown, R extends ResponseType = ResponseType>(context: FetchContext<T, R>): FetchError<T>{ ... }

Type Parameters

T= unknown
Rextends ResponseType= ResponseType

Parameters

ParameterTypeDescription
contextFetchContext<T, R>The context at the point of failure

Returns

FetchError<T>A populated FetchError instance