Instantly share code, notes, and snippets.

What would you like to do?
How to throw an error in a Meteor method
test: function() {
throw new Meteor.Error("name of the error", "Here is the reason");
});'test', function(error, response){
if (error) {
console.log("error", error);
} else {
console.log("response", response);

This comment has been minimized.

Copy link
Owner Author

yankeyhotel commented Jul 28, 2015

I use this for testing (Note: this is not how you test).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment