Function: createFetchError()
createFetchError(
response,url?):Promise<Error>
Build an Error describing a failed fetch response: status line,
the URL(s) involved (the requested url and the final response.url
after redirects, de-duplicated), and a truncated snapshot of the
response body. Reads the body defensively - a body that can’t be read
is simply omitted. Call only on a non-ok response.
Parameters
Section titled “Parameters”response
Section titled “response”Response
string
Returns
Section titled “Returns”Promise<Error>