tinacms 0.68.10 → 0.68.11

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,5 +1,13 @@
1
1
  # tinacms
2
2
 
3
+ ## 0.68.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 42af73648: Adds more useful error messages from internalClient
8
+ - Updated dependencies [ea9c190e8]
9
+ - @tinacms/toolkit@0.56.34
10
+
3
11
  ## 0.68.10
4
12
 
5
13
  ### Patch Changes
package/dist/index.es.js CHANGED
@@ -2245,7 +2245,12 @@ mutation addPendingDocumentMutation(
2245
2245
  })
2246
2246
  });
2247
2247
  if (res.status !== 200) {
2248
- throw new Error(`Unable to complete request, ${res.statusText}`);
2248
+ let errorMessage = `Unable to complete request, ${res.statusText}`;
2249
+ const resBody = await res.json();
2250
+ if (resBody.message) {
2251
+ errorMessage = `${errorMessage}, Response: ${resBody.message}`;
2252
+ }
2253
+ throw new Error(errorMessage);
2249
2254
  }
2250
2255
  const json = await res.json();
2251
2256
  if (json.errors) {
package/dist/index.js CHANGED
@@ -2263,7 +2263,12 @@ mutation addPendingDocumentMutation(
2263
2263
  })
2264
2264
  });
2265
2265
  if (res.status !== 200) {
2266
- throw new Error(`Unable to complete request, ${res.statusText}`);
2266
+ let errorMessage = `Unable to complete request, ${res.statusText}`;
2267
+ const resBody = await res.json();
2268
+ if (resBody.message) {
2269
+ errorMessage = `${errorMessage}, Response: ${resBody.message}`;
2270
+ }
2271
+ throw new Error(errorMessage);
2267
2272
  }
2268
2273
  const json = await res.json();
2269
2274
  if (json.errors) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "0.68.10",
3
+ "version": "0.68.11",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"
@@ -28,7 +28,7 @@
28
28
  "@react-hook/window-size": "^3.0.7",
29
29
  "@tinacms/schema-tools": "0.0.6",
30
30
  "@tinacms/sharedctx": "0.1.1",
31
- "@tinacms/toolkit": "0.56.33",
31
+ "@tinacms/toolkit": "0.56.34",
32
32
  "crypto-js": "^4.0.0",
33
33
  "fetch-ponyfill": "^7.1.0",
34
34
  "final-form": "4.20.1",