js firebase catch error firebase permsion code example
Example: Uncaught (in promise) Error: PERMISSION_DENIED: Permission denied at Repo.ts:632
firebase.auth().signInAnonymously().catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// ...
});