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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
0 deletions
-
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); |
|
|
|
|