on the client:
Meteor.call('foo', bar, function(error, result) {
if (error)
console.log('something went wrong');
});
on the server:
Meteor.methods({
foo: function(bar) {
if (test stuff) {
// works
} else {
// return error
};
}
});
is there a way to return an error inside the method eg. using the error parameter of the method function?