abbot-http-client 0.0.23 → 0.0.25
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/index.cjs +32 -31
- package/dist/index.js +32 -31
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -46,9 +46,6 @@ async function catchError(promise, errorToCatch) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// src/http.ts
|
|
50
|
-
var import_axios2 = require("axios");
|
|
51
|
-
|
|
52
49
|
// src/encryption/secure.ts
|
|
53
50
|
var Secure = class {
|
|
54
51
|
static keySize = 16;
|
|
@@ -229,13 +226,14 @@ var CoreHttp = class {
|
|
|
229
226
|
const response = cryp.decrypt(error.response.data);
|
|
230
227
|
err.response = response;
|
|
231
228
|
return Promise.reject(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
229
|
+
err.response
|
|
230
|
+
// new AxiosError(
|
|
231
|
+
// err.message,
|
|
232
|
+
// err.code,
|
|
233
|
+
// err.config,
|
|
234
|
+
// err.request,
|
|
235
|
+
// err.response,
|
|
236
|
+
// ),
|
|
239
237
|
);
|
|
240
238
|
} else {
|
|
241
239
|
err.response = {
|
|
@@ -245,13 +243,14 @@ var CoreHttp = class {
|
|
|
245
243
|
data: null
|
|
246
244
|
};
|
|
247
245
|
return Promise.reject(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
246
|
+
err.response
|
|
247
|
+
// new AxiosError(
|
|
248
|
+
// err.message,
|
|
249
|
+
// err.code,
|
|
250
|
+
// err.config,
|
|
251
|
+
// err.request,
|
|
252
|
+
// err.response,
|
|
253
|
+
// ),
|
|
255
254
|
);
|
|
256
255
|
}
|
|
257
256
|
} else if (error.request) {
|
|
@@ -262,13 +261,14 @@ var CoreHttp = class {
|
|
|
262
261
|
data: null
|
|
263
262
|
};
|
|
264
263
|
return Promise.reject(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
264
|
+
err.response
|
|
265
|
+
// new AxiosError(
|
|
266
|
+
// err.message,
|
|
267
|
+
// err.code,
|
|
268
|
+
// err.config,
|
|
269
|
+
// err.request,
|
|
270
|
+
// err.response,
|
|
271
|
+
// ),
|
|
272
272
|
);
|
|
273
273
|
} else {
|
|
274
274
|
err.response = {
|
|
@@ -278,13 +278,14 @@ var CoreHttp = class {
|
|
|
278
278
|
data: null
|
|
279
279
|
};
|
|
280
280
|
return Promise.reject(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
281
|
+
err.response
|
|
282
|
+
// new AxiosError(
|
|
283
|
+
// err.message,
|
|
284
|
+
// err.code,
|
|
285
|
+
// err.config,
|
|
286
|
+
// err.request,
|
|
287
|
+
// err.response,
|
|
288
|
+
// ),
|
|
288
289
|
);
|
|
289
290
|
}
|
|
290
291
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,9 +7,6 @@ async function catchError(promise, errorToCatch) {
|
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
// src/http.ts
|
|
11
|
-
import { AxiosError } from "axios";
|
|
12
|
-
|
|
13
10
|
// src/encryption/secure.ts
|
|
14
11
|
var Secure = class {
|
|
15
12
|
static keySize = 16;
|
|
@@ -190,13 +187,14 @@ var CoreHttp = class {
|
|
|
190
187
|
const response = cryp.decrypt(error.response.data);
|
|
191
188
|
err.response = response;
|
|
192
189
|
return Promise.reject(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
190
|
+
err.response
|
|
191
|
+
// new AxiosError(
|
|
192
|
+
// err.message,
|
|
193
|
+
// err.code,
|
|
194
|
+
// err.config,
|
|
195
|
+
// err.request,
|
|
196
|
+
// err.response,
|
|
197
|
+
// ),
|
|
200
198
|
);
|
|
201
199
|
} else {
|
|
202
200
|
err.response = {
|
|
@@ -206,13 +204,14 @@ var CoreHttp = class {
|
|
|
206
204
|
data: null
|
|
207
205
|
};
|
|
208
206
|
return Promise.reject(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
207
|
+
err.response
|
|
208
|
+
// new AxiosError(
|
|
209
|
+
// err.message,
|
|
210
|
+
// err.code,
|
|
211
|
+
// err.config,
|
|
212
|
+
// err.request,
|
|
213
|
+
// err.response,
|
|
214
|
+
// ),
|
|
216
215
|
);
|
|
217
216
|
}
|
|
218
217
|
} else if (error.request) {
|
|
@@ -223,13 +222,14 @@ var CoreHttp = class {
|
|
|
223
222
|
data: null
|
|
224
223
|
};
|
|
225
224
|
return Promise.reject(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
225
|
+
err.response
|
|
226
|
+
// new AxiosError(
|
|
227
|
+
// err.message,
|
|
228
|
+
// err.code,
|
|
229
|
+
// err.config,
|
|
230
|
+
// err.request,
|
|
231
|
+
// err.response,
|
|
232
|
+
// ),
|
|
233
233
|
);
|
|
234
234
|
} else {
|
|
235
235
|
err.response = {
|
|
@@ -239,13 +239,14 @@ var CoreHttp = class {
|
|
|
239
239
|
data: null
|
|
240
240
|
};
|
|
241
241
|
return Promise.reject(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
err.response
|
|
243
|
+
// new AxiosError(
|
|
244
|
+
// err.message,
|
|
245
|
+
// err.code,
|
|
246
|
+
// err.config,
|
|
247
|
+
// err.request,
|
|
248
|
+
// err.response,
|
|
249
|
+
// ),
|
|
249
250
|
);
|
|
250
251
|
}
|
|
251
252
|
}
|