When a firebase security rule (.read/.write/.validate) fails, it fails silently with a FIREBASE WARNING: logged in the console. I would like to capture the failure and present the user with a custom message (eg. "not authorised" etc.) How can this be achieved with firebase / angularfire?
P.S: I tried adding a error handler function to the angularfire promise object as follows, but it does not seem to trigger the error handler function, although the success function does trigger correctly
$firebase(dataRef).$bind($scope, "data").then(
function () {
console.log("success");
},
function (error) {
console.log("error encountered: " + error);
}
);