angularfire
angularfire copied to clipboard
createUserWithEmailAndPassword exception propagates to global handler
Version info
Angular: angular/core: "~13.1.0",
Firebase: "firebase": "^9.6.3",
AngularFire: angular/fire: "^7.2.0",
Other (e.g. Ionic/Cordova, Node, browser, operating system): Windows 10, Node.js v16.13.2., Edge and Chrome, latest version
How to reproduce these conditions
Using the compat layer
import {AngularFireAuth} from '@angular/fire/compat/auth';
// etc
// choose an email address that is already in use, this throws the exception auth/email-already-in-use as expected
this.angularFireAuth.createUserWithEmailAndPassword(email, passwd).then((userCredential) => {
// user create was successful
}).catch((error) => {
console.log(error);
// even though we catch auth/email-already-in-use
// the error still propagates to the global error handler
// and appears on the console
// see the screenshot
});
See this thread on stackoverflow where the question was asked already
** Screenshots **

Expected behavior
The exception that is caught in the catch block should not make its way to the global error handler
Actual behavior
The exception that we caught in the catch block still propagates up to the global error handler
Still facing the same problem, please let us know if someone found a solution
I also encounter this problem, the authentication error caught successfully is still thrown.
Still facing this as well. It was originally reported in 2019 and closed as a known issue with no resolution steps. There are no workarounds or documentation on the issue from the team.
Any word on this as it makes using error tracking like Sentry harder once it hits the global error handler as an unhandled exception?