@lowdefy/connection-axios-http 6.0.0 → 7.0.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
- throw new Error(`Http response "${error.response.status}: ${error.response.statusText}".`, {
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
  }
@@ -16,6 +16,10 @@
16
16
  import schema from './schema.js';
17
17
  export default {
18
18
  schema,
19
+ // An outside service, not app data: a journey on a data set keeps its real target.
20
+ meta: {
21
+ dataSet: 'external'
22
+ },
19
23
  requests: {
20
24
  AxiosHttp
21
25
  }
package/dist/types.js CHANGED
@@ -16,6 +16,13 @@
16
16
  connections: [
17
17
  'AxiosHttp'
18
18
  ],
19
+ // Non-scopable: the tenant wall does not cover this type, so its
20
+ // connections are never scoped and accept no tenant: declaration.
21
+ connectionMetas: {
22
+ AxiosHttp: {
23
+ tenant: false
24
+ }
25
+ },
19
26
  requests: [
20
27
  'AxiosHttp'
21
28
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/connection-axios-http",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -27,6 +27,9 @@
27
27
  "url": "https://github.com/lowdefy/lowdefy.git"
28
28
  },
29
29
  "type": "module",
30
+ "sideEffects": [
31
+ "**/*.css"
32
+ ],
30
33
  "exports": {
31
34
  "./connections": "./dist/connections.js",
32
35
  "./types": "./dist/types.js"
@@ -35,11 +38,12 @@
35
38
  "dist/*"
36
39
  ],
37
40
  "dependencies": {
38
- "@lowdefy/helpers": "6.0.0",
39
- "axios": "1.15.2"
41
+ "@lowdefy/helpers": "7.0.0",
42
+ "axios": "1.20.0"
40
43
  },
41
44
  "devDependencies": {
42
- "@lowdefy/ajv": "6.0.0",
45
+ "@lowdefy/ajv": "7.0.0",
46
+ "@lowdefy/errors": "7.0.0",
43
47
  "@swc/cli": "0.8.1",
44
48
  "@swc/core": "1.15.32",
45
49
  "@swc/jest": "0.2.39",