Open solace opened 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.
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 theMeteor.call
forposts.createComment
as well as outside theMeteor.call
.posts.createComment
, the error isn't displayed.action/comments.js
before theMeteor.call
, it is.return clearErrors
in the corresponding container, the error set inside theMeteor.call
callback is displayed, but is not cleared when you navigate to another page and then come back, it will only disappear if you hard reload.Would this be because
Meteor.call
is asynchronous? What would be the best way of handling error (and success) messages set in theMeteor.call
callback?