Browse Source

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

pull/3764/head
Zhong 2 years ago
committed by GitHub
parent
commit
36274025d6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      src/utils/http/axios/index.ts

1
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);

Loading…
Cancel
Save