"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.status = status;
function status(response) {
  if (response && response.status >= 200 && response.status < 300) {
    return Promise.resolve(response);
  } else {
    return Promise.reject(new Error(response && response.statusText));
  }
}