mantrajs / meteor-mantra-kickstarter

Kickstart your meteor mantra development
MIT License
184 stars 50 forks source link

Setting LocalState messages in action Meteor.call not displaying #47

Open solace opened 8 years ago

solace commented 8 years ago

Hi,

Not sure if I'm mistaken about this, but take the comments module for example.

action/comments.js sets LocalState for errors in both the Meteor.call for posts.createComment as well as outside the Meteor.call.

Would this be because Meteor.call is asynchronous? What would be the best way of handling error (and success) messages set in the Meteor.call callback?

martinhbramwell commented 8 years ago

I would also like to know the correct way to handle trapping server-side errors.

In terms of ergonomics users should never see server-side error messages, of course, but during development it's handy.

However, with the problem you describe, server-side errors don't appear in the server logs, yet get eaten by the failed display on the client.