What’s the best practice for handling publication errors and showing a meaningful error message to users?
- Subscribing to data that’s not there
- Insufficient permissions/role
- Some explicit criteria like combinations of arguments or checking DB content before returning the publication
I’m looking through https://guide.meteor.com/data-loading.html but find nothing relating to this. All the examples just use this.ready() when publications “fail”.
I’m aware of the subscription onError() callback, but this plays very poorly with stuff like React/createContainer – or maybe I’m just too stupid to make it work.
Any working examples or pointers would be nice, and I think that the guide should at least mention this stuff.
Just to clarify, my main problem is combining the React createContainer pattern with Meteor’s error handling. I can’t seem to find any good examples of this.
See my post below for example code.