@liveblocks/node 2.22.0 → 2.22.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.cjs CHANGED
@@ -3,7 +3,7 @@ var _core = require('@liveblocks/core');
3
3
 
4
4
  // src/version.ts
5
5
  var PKG_NAME = "@liveblocks/node";
6
- var PKG_VERSION = "2.22.0";
6
+ var PKG_VERSION = "2.22.1";
7
7
  var PKG_FORMAT = "cjs";
8
8
 
9
9
  // src/client.ts
@@ -1673,6 +1673,8 @@ ${this.details}`;
1673
1673
  return msg;
1674
1674
  }
1675
1675
  static async from(res) {
1676
+ const origErrLocation = new Error();
1677
+ Error.captureStackTrace(origErrLocation, _LiveblocksError.from);
1676
1678
  const FALLBACK = "An error happened without an error message";
1677
1679
  let text;
1678
1680
  try {
@@ -1686,7 +1688,9 @@ ${this.details}`;
1686
1688
  obj.suggestion ? `Suggestion: ${String(obj.suggestion)}` : void 0,
1687
1689
  obj.docs ? `See also: ${String(obj.docs)}` : void 0
1688
1690
  ].filter(Boolean).join("\n") || void 0;
1689
- return new _LiveblocksError(message, res.status, details);
1691
+ const err = new _LiveblocksError(message, res.status, details);
1692
+ err.stack = origErrLocation.stack;
1693
+ return err;
1690
1694
  }
1691
1695
  };
1692
1696