How can the client code of a Meteor app detect that a write operation (insert
, remove
, update
) against a collection was denied, so that it can display an appropriate error message?
Collection.remove(id)
The console will display:
remove failed: Access denied
This is rather obvious, but Google didn't do a good job of surfacing the relevant documentation: you need to pass a callback parameter: