Quellcode durchsuchen

fix(axios): 请求异常时,无法正确执行 catch

zuihou vor 3 Jahren
Ursprung
Commit
419b7aea07
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/utils/http/axios/Axios.ts

+ 1 - 1
src/utils/http/axios/Axios.ts

@@ -113,7 +113,7 @@ export class VAxios {
       isFunction(responseInterceptorsCatch) &&
       this.axiosInstance.interceptors.response.use(undefined, (error) => {
         // @ts-ignore
-        responseInterceptorsCatch(this.axiosInstance, error);
+        return responseInterceptorsCatch(this.axiosInstance, error);
       });
   }