@adobe/helix-onedrive-support 10.8.1 → 10.8.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [10.8.3](https://github.com/adobe/helix-onedrive-support/compare/v10.8.2...v10.8.3) (2023-09-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * trigger release ([e7cd84f](https://github.com/adobe/helix-onedrive-support/commit/e7cd84f82abb4ebeee7354b958997ccee51f2cba))
7
+
8
+ ## [10.8.2](https://github.com/adobe/helix-onedrive-support/compare/v10.8.1...v10.8.2) (2023-09-27)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * better html error ([#445](https://github.com/adobe/helix-onedrive-support/issues/445)) ([1284b28](https://github.com/adobe/helix-onedrive-support/commit/1284b2856b19c4d3b9ac6c17f9b2e8607e18a54b)), closes [#444](https://github.com/adobe/helix-onedrive-support/issues/444)
14
+
1
15
  ## [10.8.1](https://github.com/adobe/helix-onedrive-support/compare/v10.8.0...v10.8.1) (2023-09-27)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-onedrive-support",
3
- "version": "10.8.1",
3
+ "version": "10.8.3",
4
4
  "description": "Helix OneDrive Support",
5
5
  "main": "src/index.js",
6
6
  "exports": {
package/src/OneDrive.js CHANGED
@@ -152,12 +152,16 @@ export class OneDrive {
152
152
  }
153
153
 
154
154
  if (!resp.ok) {
155
- const text = await resp.text();
155
+ let text = await resp.text();
156
156
  let err;
157
157
  try {
158
158
  // try to parse json
159
159
  err = StatusCodeError.fromErrorResponse(JSON.parse(text), resp.status, rateLimit);
160
160
  } catch {
161
+ if (text.startsWith('<!DOCTYPE html>')) {
162
+ log.warn('onedrive returned html response', text);
163
+ text = 'Something went wrong: HTML error from graph api.';
164
+ }
161
165
  err = new StatusCodeError(text, resp.status, null, rateLimit);
162
166
  }
163
167
  throw err;