title: Get notified after axios timeout
body: <p>I have an API call using axios. A timeout is set for 2500 millis. What I want is axios to return a value after the timeout so I can notify to the user the request  is aborted due to some server or network error.</p>
  
  <p>How I initialized the timeout</p>
  
  <pre><code>const instance = axios.create();
  instance.defaults.timeout = 2500;
  </code></pre>
  
  <p>Below is the function that should return a value after the timeout</p>
  
  <pre><code>_post(url, body, token) {
          return new Promise((resolve, reject) =&gt; {
              instance
                  .post(url, body, {headers: {
                          'Accept': 'application/json',
                          'Content-Type': 'application/json'
                      }})
                  .then(data =&gt; {
                      resolve(data);
                  })
                  .catch(error =&gt; {
                      reject(error);
                  });
          });
      }
  </code></pre>
  
  <p>Thank you!</p>