@axiom-lattice/client-sdk 2.0.0 → 2.0.2
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/dist/client.d.ts.map +1 -1
- package/dist/client.js +8 -2
- package/dist/client.js.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2256,7 +2256,10 @@ var Client = class extends AbstractClient {
|
|
|
2256
2256
|
}
|
|
2257
2257
|
);
|
|
2258
2258
|
if (!response.ok) {
|
|
2259
|
-
|
|
2259
|
+
const errorData = await response.json().catch(() => ({}));
|
|
2260
|
+
throw new Error(
|
|
2261
|
+
errorData.error || errorData.message || `HTTP error! Status: ${response.status}`
|
|
2262
|
+
);
|
|
2260
2263
|
}
|
|
2261
2264
|
if (!response.body) {
|
|
2262
2265
|
throw new Error("Response body is null");
|
|
@@ -2344,7 +2347,10 @@ var Client = class extends AbstractClient {
|
|
|
2344
2347
|
}
|
|
2345
2348
|
);
|
|
2346
2349
|
if (!response.ok) {
|
|
2347
|
-
|
|
2350
|
+
const errorData = await response.json().catch(() => ({}));
|
|
2351
|
+
throw new Error(
|
|
2352
|
+
errorData.error || errorData.message || `HTTP error! Status: ${response.status}`
|
|
2353
|
+
);
|
|
2348
2354
|
}
|
|
2349
2355
|
if (!response.body) {
|
|
2350
2356
|
throw new Error("Response body is null");
|