Description
I setup a cancelCallback function as per the docs however it isn't called.
To test/repro, setup a security rule for a particular node in firebase and then intentionally send the wrong data (i.e. missing fields that are required by newData.hasChildren
for example).
What I end up with is a warning in the browser console:
FIREBASE WARNING: set at /trips/-KcqIr6OQFk6vNPLFBTy failed: permission_denied
And also an error in the browser console:
Uncaught (in promise) Error: PERMISSION_DENIED: Permission denied
I was expecting the function specified via cancelCallback to be called but it's not.
I found I could manually catch any errors after the push using:
.then(function(success) {}, function(error) {});
However if I was to try console.log(error)
in the above error catch it would print the entire callstack as a string. Possibly I'm doing it wrong but I would have expected an error object.
Either way I'm not having any luck getting cancelCallback working and any help would be appreciated :)