title: Unhandled Rejection (TypeError): Cannot read property 'status' of undefined
body: <p>I am using redux toolkit and doing API call. However I am getting the error:
  Uncaught (in promise) TypeError: Cannot read property 'status' of undefined
  at SignUpForm.otpEmailCallBack (signUp.jsx:215)
  at api.js:50</p>
  <pre><code>otpEmailCallBack = (res) =&gt; {
      if (res.status === 200) {
        toast(&lt;AlertSuccess message={res.data.otp} /&gt;);
        this.props.updateStep(null, 4);
        this.props.updateVerifyEmail({
          otp: res.data.otp,
          email: this.state.data.email,
          code: res.data.code,
        });
      } else {
        toast(&lt;AlertError message={res.data.error} /&gt;);
      }
    };
  </code></pre>
  <p>Any help is appreciated.</p>