How Axios Processes Interceptors Order Matters

If you’ve written any frontend app with authentication, you've probably used Axios interceptors. But have you ever thought about the order in which they run? I hadn’t, until I ran into a bug (or maybe a feature). While setting up my refresh token logic, I created two request interceptors like this: instance . interceptors . request . use ( refreshTokenInterceptor ) ; instance . interceptors .…