createUserWithEmailAndPassword exception propagates to global handler
- Vorherrschende Sprache
- TypeScript
- Sterne
- 7.8k
- Forks
- 2.2k
- Ø Merge
- 22 Std. 28 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
### 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](https://stackoverflow.com/questions/67580158/cant-catch-exception-in-angularfireauth)
** 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
Beitragsleitfaden
Rechercherichtung
Beginne am Einstiegspunkt @angular/fire/compat/auth und reproduziere das Problem mit createUserWithEmailAndPassword unter Verwendung einer bereits registrierten E-Mail-Adresse. Verfolge den abgefangenen auth/email-already-in-use-Fehler und vergleiche das Verhalten von promise catch mit dem globalen Fehlerhandler. Als erledigt gilt die Aufgabe, wenn die abgefangene Exception den globalen Fehlerhandler oder die Konsole nicht mehr erreicht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, firebase, typescript
- Bereich
- authentication, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100