Skip to content

Commit

Permalink
feat(dispatchr): add cause for thrown error (#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
nspector authored Jun 10, 2022
1 parent 2518ccb commit c899839
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint .",
"test": "lerna run lint --since --stream && jest"
"test": "lerna run lint --since --stream && jest --forceExit"
},
"devDependencies": {
"@babel/cli": "^7.11.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/dispatchr/lib/Dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Dispatcher.prototype._throwOrCallErrorHandler =
context
);
} else {
throw new Error(message);
throw new Error(message, { cause: meta && meta.error });
}
};

Expand Down

0 comments on commit c899839

Please sign in to comment.