title: if condition is not working in error response
body: <p>When I tried to check the condition for the response status, it is not even going inside and checking if, what should be done to compare and show the alert. FYI swal is a npm package used for alert</p>
  
  <pre><code>onSubmit(values) {
      this.props.signIn(values, response =&gt; {
          if (response.status === 200) {
              swal("Login successful", "Signed In", "success");
              this.props.history.push(`/dashboard/${response.data.user_name}`);
          } else {
              console.log("wrong password");
              swal({
                  title: "Invalid Email Id or password",
                  icon: "warning"
              });
          }
      });
  };
  </code></pre>
  
  <p>Action.js</p>
  
  <pre><code>export function signIn(values, callback) {
      const request = axios.post(`${ROOT_URL}/${APP_ID}/${API_KEY}/users/login`, values).then(() =&gt; callback());
  
      return {
          type: LOGIN_DETAILS,
          payload: request
      };
  }
  </code></pre>