import { IHttpFetchError } from './types' ; internal export class HttpFetchError extends Error implements IHttpFetchError { public readonly name : string ; public readonly req : Request ; public readonly res ? : Response ; constructor ( message , name , public readonly request , public readonly response ? , public readonly body ? ) { super ( message ) ; this . name = name ; this . req = request ; this . res = response ; if ( Error . captureStackTrace ) { Error . captureStackTrace ( this , HttpFetchError ) ; } } }