@adobe/helix-onedrive-support 5.1.0 → 5.1.1

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.
@@ -1,8 +1,8 @@
1
1
  version: 2.1
2
2
  executors:
3
- node12:
3
+ :
4
4
  docker:
5
- - image: circleci/node:12
5
+ - image: circleci/node:14
6
6
  environment:
7
7
  NPM_CONFIG_PREFIX: ~/.npm-global
8
8
 
@@ -29,7 +29,7 @@ commands:
29
29
 
30
30
  jobs:
31
31
  build:
32
- executor: node12
32
+ executor: node14
33
33
 
34
34
  steps:
35
35
  - setup
@@ -10,10 +10,10 @@ jobs:
10
10
  if: "!contains(github.event.head_commit.message, '[skip ci]')"
11
11
  steps:
12
12
  - uses: actions/checkout@v2
13
- - name: Use Node.js 12.x
13
+ - name: Use Node.js 14.x
14
14
  uses: actions/setup-node@v2
15
15
  with:
16
- node-version: '12.x'
16
+ node-version: '14.x'
17
17
  - run: npm install
18
18
  - run: npm test
19
19
  - run: npm run semantic-release
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.1.1](https://github.com/adobe/helix-onedrive-support/compare/v5.1.0...v5.1.1) (2021-09-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * better error report ([#191](https://github.com/adobe/helix-onedrive-support/issues/191)) ([a63bb4f](https://github.com/adobe/helix-onedrive-support/commit/a63bb4f2819d7764885a5a1ad99923ba172f6d93)), closes [#190](https://github.com/adobe/helix-onedrive-support/issues/190)
7
+
1
8
  # [5.1.0](https://github.com/adobe/helix-onedrive-support/compare/v5.0.3...v5.1.0) (2021-08-31)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-onedrive-support",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Helix OneDrive Support",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -28,9 +28,9 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@adobe/eslint-config-helix": "1.1.5",
31
- "@semantic-release/changelog": "5.0.1",
32
- "@semantic-release/git": "9.0.0",
33
- "ajv": "8.6.2",
31
+ "@semantic-release/changelog": "6.0.0",
32
+ "@semantic-release/git": "10.0.0",
33
+ "ajv": "8.6.3",
34
34
  "codecov": "3.8.3",
35
35
  "commitizen": "4.2.4",
36
36
  "cz-conventional-changelog": "3.3.0",
@@ -44,7 +44,7 @@
44
44
  "mocha": "9.1.1",
45
45
  "nock": "13.1.3",
46
46
  "nyc": "15.1.0",
47
- "semantic-release": "17.4.7"
47
+ "semantic-release": "18.0.0"
48
48
  },
49
49
  "lint-staged": {
50
50
  "*.js": "eslint"
package/src/OneDrive.js CHANGED
@@ -292,7 +292,7 @@ class OneDrive extends EventEmitter {
292
292
  if (err.statusCode === 404) {
293
293
  this.log.warn(`${relUrl} : ${err.statusCode} - ${err.message}`);
294
294
  } else {
295
- this.log.error(`${relUrl} : ${err.statusCode} - ${err.message} - ${err.details}`);
295
+ this.log.error(`${relUrl} : ${err.statusCode} - ${err.message}`, err.details);
296
296
  }
297
297
  throw err;
298
298
  }
@@ -43,6 +43,10 @@ class StatusCodeError extends Error {
43
43
  * @returns {StatusCodeError} status code error
44
44
  */
45
45
  static fromErrorResponse(errorBody, statusCode) {
46
+ if (errorBody.error && errorBody.error.message) {
47
+ // eslint-disable-next-line no-param-reassign
48
+ errorBody = errorBody.error;
49
+ }
46
50
  return new StatusCodeError(errorBody.message, statusCode, errorBody);
47
51
  }
48
52