@magiclabs.ai/magicbook-client 0.7.16-canary → 0.7.17-canary

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/index.cjs CHANGED
@@ -95,7 +95,7 @@ var statesToCloseWS = [
95
95
  ];
96
96
  var statesToReport = ["error", "timeout"];
97
97
  var isDesignRequestSubmitted = (state) => !["new", "ingesting"].includes(state);
98
- var canSubmitDesignRequest = (state) => ["new", "ingesting", "ready"].includes(state);
98
+ var canSubmitDesignRequest = (state) => ["new", "ingesting", "ready", "error"].includes(state);
99
99
  var occasions = [
100
100
  "baby",
101
101
  "birthday",
@@ -5856,7 +5856,7 @@ var DesignRequest = class {
5856
5856
  }
5857
5857
  async submit(submitDesignRequestProps) {
5858
5858
  if (!canSubmitDesignRequest(this.state)) {
5859
- throw new Error("You need to wait for the current design request to be ready before submitting a new one");
5859
+ throw new Error("You need to wait for the current design request to be completed before submitting a new one.");
5860
5860
  } else {
5861
5861
  submitDesignRequestProps && this.updateDesignRequest(submitDesignRequestProps);
5862
5862
  this.webSocket = new WebSocket(`${this.client.webSocketHost}/?book_id=${this.parentId}`);