lib/index.js
function responseStatus(res) {
  if (res.status >= 200 && res.status < 300) {
    return res;
  } else {
    var error = new Error(res.statusText);
    error.response = res;
    throw customError('responseStatus', error);
  }
}
function responseStatus(res) {
  if (res.status >= 200 && res.status < 300) {
    return res;
  } else {
    var error = new Error(res.statusText);
    error.response = res;
    throw customError('responseStatus', error);
  }
}
function responseStatus ( res ) { if ( res . status >= 200 && res . status < 300 ) { return res ; } else { var error = new Error ( res . statusText ) ; error . response = res ; throw customError ( 'responseStatus' , error ) ; } }
responseStatus
take a response and check the response `status` property
if between 200-300 return the response object
else throw a custom error
@param  {Object} res
@return {Object}
responseStatus take a response and check the response status property if between 200 - 300 return the response object else throw a custom error