@lingo.dev/_sdk 0.7.26 → 0.7.27

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/build/index.cjs CHANGED
@@ -93,6 +93,9 @@ var LingoDotDevEngine = class {
93
93
  }
94
94
  }
95
95
  const jsonResponse = await res.json();
96
+ if (!jsonResponse.data && jsonResponse.error) {
97
+ throw new Error(jsonResponse.error);
98
+ }
96
99
  return jsonResponse.data || {};
97
100
  }
98
101
  /**
package/build/index.mjs CHANGED
@@ -93,6 +93,9 @@ var LingoDotDevEngine = class {
93
93
  }
94
94
  }
95
95
  const jsonResponse = await res.json();
96
+ if (!jsonResponse.data && jsonResponse.error) {
97
+ throw new Error(jsonResponse.error);
98
+ }
96
99
  return jsonResponse.data || {};
97
100
  }
98
101
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_sdk",
3
- "version": "0.7.26",
3
+ "version": "0.7.27",
4
4
  "description": "Lingo.dev JS SDK",
5
5
  "private": false,
6
6
  "publishConfig": {