ag-common 0.0.595 → 0.0.596
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.
|
@@ -34,7 +34,7 @@ const apiResponseToAxiosResponse = (p) => __awaiter(void 0, void 0, void 0, func
|
|
|
34
34
|
catch (e) {
|
|
35
35
|
const er = e;
|
|
36
36
|
//try and get body
|
|
37
|
-
let statusText = er.statusText;
|
|
37
|
+
let statusText = er.statusText || (e === null || e === void 0 ? void 0 : e.stack) || '';
|
|
38
38
|
if (er.body) {
|
|
39
39
|
try {
|
|
40
40
|
const st = yield (0, stream_1.getStringFromStream)(er.body);
|
|
@@ -48,7 +48,8 @@ const apiResponseToAxiosResponse = (p) => __awaiter(void 0, void 0, void 0, func
|
|
|
48
48
|
data: undefined,
|
|
49
49
|
status: er.status,
|
|
50
50
|
statusText,
|
|
51
|
-
headers:
|
|
51
|
+
headers: er.headers &&
|
|
52
|
+
(0, array_1.arrayToObject)(Object.entries(er.headers), (s) => s[0], (s) => s[1]),
|
|
52
53
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
54
|
config: {},
|
|
54
55
|
};
|
package/package.json
CHANGED