@objectstack/client 4.1.0 → 4.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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -2882,7 +2882,7 @@ var ObjectStackClient = class {
|
|
|
2882
2882
|
status: res.status,
|
|
2883
2883
|
error: errorBody
|
|
2884
2884
|
});
|
|
2885
|
-
const errorMessage = errorBody?.message
|
|
2885
|
+
const errorMessage = errorBody?.message ?? errorBody?.error?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0) ?? res.statusText;
|
|
2886
2886
|
const errorCode = errorBody?.code || errorBody?.error?.code;
|
|
2887
2887
|
const error = new Error(`[ObjectStack] ${errorCode ? `${errorCode}: ` : ""}${errorMessage}`);
|
|
2888
2888
|
error.code = errorCode;
|