title: axios interceptor's error function is called multiple times
body: <p>I am using axios interceptors to log all the api errors to a backend server at one common place. The problem is, if one api call fails the logError function is called multiple times and multiple duplicate requests were sent for logging.</p>
  <p>Here's my code</p>
  <pre><code>axios.interceptors.response.use(response =&gt; {
      return response;
  },
  error =&gt; {
      logError(error.message);
      return Promise.reject(error);
  })
  </code></pre>