export class HttpFetchError extends Error { response : Response ; constructor ( message ) { super ( message ) ; this . name = "HttpFetchError" ; if ( Error . captureStackTrace ) { Error . captureStackTrace ( this , HttpFetchError ) ; } } } export class HttpResponseError extends Error { response : Response ; responseJson : any ; constructor ( response , responseJson ? ) { super ( response . statusText ) ; this . name = "HttpResponseError" ; if ( Error . captureStackTrace ) { Error . captureStackTrace ( this , HttpResponseError ) ; } this . response = response ; this . responseJson = responseJson ; } } export class HttpParseError extends Error { response : Response ; constructor ( response ) { super ( response . statusText ) ; this . name = "HttpParseError" ; if ( Error . captureStackTrace ) { Error . captureStackTrace ( this , HttpParseError ) ; } this . response = response ; } }