@promptbook/pdf 0.82.0-2 → 0.82.0-3

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/esm/index.es.js CHANGED
@@ -22,7 +22,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- var PROMPTBOOK_ENGINE_VERSION = '0.82.0-1';
25
+ var PROMPTBOOK_ENGINE_VERSION = '0.82.0-2';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1819,11 +1819,17 @@ var ALL_ERRORS = __assign(__assign({}, PROMPTBOOK_ERRORS), COMMON_JAVASCRIPT_ERR
1819
1819
  * @public exported from `@promptbook/utils`
1820
1820
  */
1821
1821
  function deserializeError(error) {
1822
+ var name = error.name, stack = error.stack;
1823
+ var message = error.message;
1822
1824
  var ErrorClass = ALL_ERRORS[error.name];
1823
1825
  if (ErrorClass === undefined) {
1824
- return new Error("".concat(error.name, ": ").concat(error.message));
1826
+ ErrorClass = Error;
1827
+ message = "".concat(name, ": ").concat(message);
1825
1828
  }
1826
- return new ErrorClass(error.message);
1829
+ if (stack !== undefined && stack !== '') {
1830
+ message = spaceTrim$1(function (block) { return "\n ".concat(block(message), "\n\n Original stack trace:\n ").concat(block(stack || ''), "\n "); });
1831
+ }
1832
+ return new ErrorClass(message);
1827
1833
  }
1828
1834
 
1829
1835
  /**