export class HttpError extends Error { constructor ( public method , public url , public status , public statusText , public body ) { super ( `Failed to call api ${ method } ${ url }, status code: ${ status }` ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; } }