@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 CHANGED
@@ -2912,7 +2912,7 @@ var ObjectStackClient = class {
2912
2912
  status: res.status,
2913
2913
  error: errorBody
2914
2914
  });
2915
- const errorMessage = errorBody?.message || errorBody?.error?.message || res.statusText;
2915
+ const errorMessage = errorBody?.message ?? errorBody?.error?.message ?? (typeof errorBody?.error === "string" ? errorBody.error : void 0) ?? res.statusText;
2916
2916
  const errorCode = errorBody?.code || errorBody?.error?.code;
2917
2917
  const error = new Error(`[ObjectStack] ${errorCode ? `${errorCode}: ` : ""}${errorMessage}`);
2918
2918
  error.code = errorCode;