File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -262,9 +262,6 @@ export function Axios(config) {
262262 }
263263
264264 retryAxios ( options ) . then ( response => {
265- // Clean up interceptors
266- retrySetup . cleanup ( ) ;
267-
268265 var exceptionClass = {
269266 400 : Exceptions . InvalidRequestError ,
270267 401 : Exceptions . AuthenticationError ,
@@ -296,9 +293,6 @@ export function Axios(config) {
296293 } ) ;
297294 } )
298295 . catch ( function ( error ) {
299- // Clean up interceptors on error too
300- retrySetup . cleanup ( ) ;
301-
302296 if ( error . response == undefined ) {
303297 return reject ( error . stack ) ;
304298 }
@@ -331,6 +325,10 @@ export function Axios(config) {
331325 }
332326 reject ( error . stack + '\n' + JSON . stringify ( error . response . data ) ) ;
333327 } )
328+ . finally ( ( ) => {
329+ // Clean up interceptors in all cases - success, error, or unexpected exception
330+ retrySetup . cleanup ( ) ;
331+ } )
334332 }
335333 else {
336334 axios ( options ) . then ( response => {
You can’t perform that action at this time.
0 commit comments