@clonegod/ttd-core 3.1.38 → 3.1.39
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/dist/util/httputil.js +3 -5
- package/package.json +1 -1
package/dist/util/httputil.js
CHANGED
|
@@ -103,15 +103,13 @@ function createAxiosInstance() {
|
|
|
103
103
|
return config;
|
|
104
104
|
});
|
|
105
105
|
instance.interceptors.response.use((response) => response, (error) => {
|
|
106
|
-
var _a;
|
|
106
|
+
var _a, _b;
|
|
107
107
|
const simplifiedError = simplifyAxiosError(error);
|
|
108
108
|
const url = ((_a = error.config) === null || _a === void 0 ? void 0 : _a.url) || 'unknown url';
|
|
109
|
-
console.
|
|
109
|
+
console.warn(`[HttpUtil] ${url} → ${simplifiedError}`);
|
|
110
110
|
const simplifiedAxiosError = new Error(simplifiedError);
|
|
111
111
|
simplifiedAxiosError.isAxiosError = true;
|
|
112
|
-
simplifiedAxiosError.
|
|
113
|
-
simplifiedAxiosError.response = error.response;
|
|
114
|
-
simplifiedAxiosError.request = error.request;
|
|
112
|
+
simplifiedAxiosError.status = (_b = error.response) === null || _b === void 0 ? void 0 : _b.status;
|
|
115
113
|
return Promise.reject(simplifiedAxiosError);
|
|
116
114
|
});
|
|
117
115
|
return instance;
|