Axios Interceptors retry original request and access original promise
Clash Royale CLAN TAG #URR8PPP Axios Interceptors retry original request and access original promise I have an interceptor in place to catch 401 errors if the access token expires. If it expires it tries the refresh token to get a new access token. If any other calls are made during this time they are queued until the access token is validated. This is all working very well. However when processing the queue using Axios(originalRequest) the originally attached promises are not being called. See below for an example. Working interceptor code: Axios.interceptors.response.use( response => response, (error) => { const status = error.response ? error.response.status : null const originalRequest = error.config if (status === 401) { if (!store.state.auth.isRefreshing) { store.dispatch('auth/refresh') } const retryOrigReq = store.dispatch('auth/subscribe', token => { originalRequest.headers['Authorization'] = ...