function handleError(response, request = {}) {
	// in case of network issue
	if (response instanceof Error) {
		return new HTTPError({ response, data: response });
	}

	return handleBody(response, request).then(body => new HTTPError(body));
}
/**
 * handleHttpResponse - handle the http error
 *
 * @param  {Response} response A response object
 * @return {Promise}           A promise that reject with the result of parsing the body
 */
handle the http error
@param  {Response} response A response object
@return {Promise}           A promise that reject with the result of parsing the body
handle the http error @param { Response } response A response object @return { Promise } A promise that reject with the result of parsing the body
function handleError(response, request = {}) {
	if (response instanceof Error) {
		return new HTTPError({ response, data: response });
	}
	return handleBody(response, request).then(body => new HTTPError(body));
}
function handleError ( response , request = { } ) { if ( response instanceof Error ) { return new HTTPError ( { response , data : response } ) ; } return handleBody ( response , request ) . then ( body => new HTTPError ( body ) ) ; }
handleHttpResponse - handle the http error
 @param  {Response} response A response object
 @return {Promise}           A promise that reject with the result of parsing the body
handleHttpResponse - handle the http error @param { Response } response A response object @return { Promise } A promise that reject with the result of parsing the body
// in case of network issue