@lark-apaas/client-toolkit 1.2.8-alpha.4 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/axiosConfig.js +5 -5
- package/package.json +1 -1
package/lib/utils/axiosConfig.js
CHANGED
|
@@ -237,8 +237,8 @@ function initAxiosConfig(axiosInstance) {
|
|
|
237
237
|
return config;
|
|
238
238
|
}, (error)=>Promise.reject(error));
|
|
239
239
|
instance.interceptors.response.use((response)=>response, (error)=>{
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
try {
|
|
241
|
+
if (error.response?.status === 403) {
|
|
242
242
|
const method = (error.config?.method || 'GET').toUpperCase();
|
|
243
243
|
const url = (error.config?.url || '').split('?')[0];
|
|
244
244
|
logger.debug({
|
|
@@ -252,9 +252,9 @@ function initAxiosConfig(axiosInstance) {
|
|
|
252
252
|
],
|
|
253
253
|
meta: {}
|
|
254
254
|
});
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
255
|
+
return error.response;
|
|
256
|
+
}
|
|
257
|
+
} catch (e) {}
|
|
258
258
|
return Promise.reject(error);
|
|
259
259
|
});
|
|
260
260
|
'production' !== process.env.NODE_ENV && instance.interceptors.response.use((response)=>{
|