@promptbook/remote-server 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
@@ -28,7 +28,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
28
28
  * @generated
29
29
  * @see https://github.com/webgptorg/promptbook
30
30
  */
31
- var PROMPTBOOK_ENGINE_VERSION = '0.82.0-1';
31
+ var PROMPTBOOK_ENGINE_VERSION = '0.82.0-2';
32
32
  /**
33
33
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
34
34
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2860,11 +2860,17 @@ function createCollectionFromJson() {
2860
2860
  * @public exported from `@promptbook/utils`
2861
2861
  */
2862
2862
  function deserializeError(error) {
2863
+ var name = error.name, stack = error.stack;
2864
+ var message = error.message;
2863
2865
  var ErrorClass = ALL_ERRORS[error.name];
2864
2866
  if (ErrorClass === undefined) {
2865
- return new Error("".concat(error.name, ": ").concat(error.message));
2867
+ ErrorClass = Error;
2868
+ message = "".concat(name, ": ").concat(message);
2866
2869
  }
2867
- return new ErrorClass(error.message);
2870
+ if (stack !== undefined && stack !== '') {
2871
+ message = spaceTrim$1(function (block) { return "\n ".concat(block(message), "\n\n Original stack trace:\n ").concat(block(stack || ''), "\n "); });
2872
+ }
2873
+ return new ErrorClass(message);
2868
2874
  }
2869
2875
 
2870
2876
  /**