@lowdefy/connection-axios-http 6.0.0 → 6.1.0
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.
|
@@ -41,9 +41,15 @@ async function AxiosHttp({ request, connection }) {
|
|
|
41
41
|
};
|
|
42
42
|
} catch (error) {
|
|
43
43
|
if (error.response) {
|
|
44
|
-
|
|
44
|
+
const responseError = new Error(`Http response "${error.response.status}: ${error.response.statusText}".`, {
|
|
45
45
|
cause: error
|
|
46
46
|
});
|
|
47
|
+
// The wrapper is what the request layer sees, and codes are read from
|
|
48
|
+
// each error's own fields, so the upstream code and status have to live
|
|
49
|
+
// here too.
|
|
50
|
+
responseError.code = error.code;
|
|
51
|
+
responseError.statusCode = error.response.status;
|
|
52
|
+
throw responseError;
|
|
47
53
|
}
|
|
48
54
|
throw error;
|
|
49
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/connection-axios-http",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -35,11 +35,12 @@
|
|
|
35
35
|
"dist/*"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@lowdefy/helpers": "6.
|
|
39
|
-
"axios": "1.
|
|
38
|
+
"@lowdefy/helpers": "6.1.0",
|
|
39
|
+
"axios": "1.18.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@lowdefy/ajv": "6.
|
|
42
|
+
"@lowdefy/ajv": "6.1.0",
|
|
43
|
+
"@lowdefy/errors": "6.1.0",
|
|
43
44
|
"@swc/cli": "0.8.1",
|
|
44
45
|
"@swc/core": "1.15.32",
|
|
45
46
|
"@swc/jest": "0.2.39",
|