<h4 dir="auto">Background</h4>
<p dir="auto">Every week axios receives lots of new issues, and most of them are problems about how to get the expected response. Some of them are simple or duplicated, some are similar but with tricky differences, and some are complex without enough and clear information.</p>
<h4 dir="auto">Possible actions</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> maintain a F.A.Q page or tutorial
<ul dir="auto">
<li>something like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="275736381" data-permission-text="Title is private" data-url="https://github.com/axios/axios/issues/1195" data-hovercard-type="issue" data-hovercard-url="/axios/axios/issues/1195/hovercard?comment_id=579600201&amp;comment_type=issue_comment" href="https://github.com/axios/axios/issues/1195#issuecomment-579600201">#1195 (comment)</a>, to help users try to solve the issue by themselves first</li>
<li>or better website page with interactions or something I don't know</li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> update issue templates to collect enough information and <em><strong>reject offenders</strong></em>
<ul dir="auto">
<li>if users thought they really need to open an issue, make sure others can help them easier</li>
<li>if an issue didn't follow the template, or without potential suggestions for axios, it will be closed directly</li>
</ul>
</li>
</ul>
<p dir="auto">It may be a little rude for users seeking for help. But please understand the differences between Github issues and stackoverflow questions. Issue readers are same developers like you. The best debugger is yourself, because only you know everything about the problem. You may not familiar with axios codes, but it is simple to read and easy to get familiar with.</p>
<h4 dir="auto">About pulls</h4>
<p dir="auto">By the way, call help for more reviewers to handle the accumulated pull requests. Anyone in the community can leave comments for them. The main strategy is conservative and do not introduce bugs and too much breaking changes.</p>
<hr>
<p dir="auto">Everything above is my personal thoughts, which doesn't stand for axios official decisions. Forgive my non-native English, and I just wish this project can be better with the community's help.</p>
<h4 dir="auto">Describe the issue</h4>
<p dir="auto">I am trying to access a route in the API that checks whether an access token is valid or not. If it is not valid, jwt returns jwt expired error.</p>
<p dir="auto">In my axios response interceptor I verify I get that error. However, I would like to make an automatic request to the server to get a new access token if I get this error.</p>
<p dir="auto">Can this be done in axios?</p>
<p dir="auto">axios interceptor</p>
<h4 dir="auto">Example Code</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="service.interceptors.response.use(
  response =&gt; {


    return response.data
  },
  error =&gt; {
    console.log('error', error)
    if (error.response.data.error === 'TokenExpiredError') {
     // make new request here to refresh token
    }
    return Promise.reject({ ...error })
  },
)"><pre class="notranslate"><code class="notranslate">service.interceptors.response.use(
  response =&gt; {


    return response.data
  },
  error =&gt; {
    console.log('error', error)
    if (error.response.data.error === 'TokenExpiredError') {
     // make new request here to refresh token
    }
    return Promise.reject({ ...error })
  },
)
</code></pre></div>
<h4 dir="auto">Expected behavior, if applicable</h4>
<p dir="auto">A new request is made to the API instead of returning an error</p>
<h4 dir="auto">Environment</h4>
<ul dir="auto">
<li>Axios Version ^0.19.2]</li>
<li>Adapter [HTTP]</li>
<li>Browser [Chrome]</li>
<li>Browser Version [84.0.4147.105 (Official Build) (64-bit)]</li>
<li>Node.js Version [13.0.1]</li>
<li>OS: [Ubuntu 18.04]</li>
<li>Additional Library Versions [React ^16.13.1]</li>
</ul>
<h4 dir="auto">Additional context/Screenshots</h4>
<p dir="auto">Add any other context about the problem here. If applicable, add screenshots to help explain.</p>