Ver Fonte

fix(util): resolve executing retry even when HTTP status code is 401 (#3756)

Zhong há 1 ano atrás
pai
commit
36274025d6
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      src/utils/http/axios/index.ts

+ 1 - 0
src/utils/http/axios/index.ts

@@ -216,6 +216,7 @@ const transform: AxiosTransform = {
     const { isOpenRetry } = config.requestOptions.retryRequest;
     config.method?.toUpperCase() === RequestEnum.GET &&
       isOpenRetry &&
+      error?.response?.status !== 401 &&
       // @ts-ignore
       retryRequest.retry(axiosInstance, error);
     return Promise.reject(error);