mol_wire_lib 1.0.107 → 1.0.110

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/node.test.js CHANGED
@@ -688,7 +688,12 @@ var $;
688
688
  }
689
689
  }
690
690
  catch (error) {
691
- result = error;
691
+ if (error instanceof Error || error instanceof Promise) {
692
+ result = error;
693
+ }
694
+ else {
695
+ result = new Error(String(error), { cause: error });
696
+ }
692
697
  if (result instanceof Promise && !handled.has(result)) {
693
698
  result = Object.assign(result.finally(() => {
694
699
  if (this.cache === result)