title: axios-retry not working as expected. What is wrong with my config?
body: <p>I have configured axios-retry in my nodejs application as per <a href="https://www.npmjs.com/package/axios-retry" rel="nofollow noreferrer">https://www.npmjs.com/package/axios-retry</a></p>
  <p>Following is my code</p>
  <pre><code>import axios from 'axios';
  import axiosRetry from 'axios-retry';
  
  
  export class RetryRoute {
  
    public async testRetry(
      req: express.Request,
      res: express.Response,
      next: express.NextFunction,
   ): Promise&lt;any&gt; {
       const client = axios.create({ baseURL: `http://www.test.com/` });
       axiosRetry(axios, { retries: 3 });
  
       client.get('/error') 
          .then(result =&gt; {
              this.logger.info('success', result);
              result.data; 
          }).catch(error =&gt; { 
              console.log('error', error.message);
              error !== undefined
          });
   }
  }
  </code></pre>
  <p><strong>console.log('error', error.message);</strong>. prints as expected. which means call is failed with code 404 as expected. But next call from retry not happening.</p>