//Imports
import { Alert } from "react-native";

const status = {
  checkStatus(response) {
    console.log("Response: " + JSON.stringify(response));
    if (response.ok) {
      //status 200
      return response;
    } else {
      //Service Failed Message
      let error = new Error(
        "Service returned invalid response: " + response.statusText
      );
      error.response = response;
      throw error;
    }
  },
};
export default status;
