title: Possible Unhandled Promise Rejection Network Error in React Native
body: <p>I setup my local server using <code>express.js</code>, That simply handle request and return simple message. </p>
  
  <pre><code>app.get('/hello', (req, res) =&gt; {
      res.send('Hello world !');
  });
  </code></pre>
  
  <p>I executed server and test it on web-browser, it works well. </p>
  
  <p>Simply I want to do that on my <code>react-native</code> app.</p>
  
  <p>this is my <code>action.js</code> file </p>
  
  <pre><code>import axios from 'axios';
  
  exports.helloButtonPressAct = (email, password) =&gt; {
      return function (dispatch) {
          return axios.get('http://localhost:3000/hello')
              .then(function (response) {
                  console.log(response);
  
                  // and create action obj here
                  // dispatch(someAction(...))
              })
              .catch(function (error) {
                  throw error;
                  console.log(error);
              });
      };
  };
  </code></pre>
  
  <p>It only return <code>catch()</code> result. </p>
  
  <blockquote>
    <p>Possible Unhandled Promise Rejection (id: 0): Network Error  Error:
    Network Error at createError ...</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/b6FNJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/b6FNJ.png" alt="enter image description here"></a></p>
  
  <p>Maybe something wrong but I couldn't find what is it.</p>
  
  <p>How can I fix this? </p>