createUserWithEmailAndPassword exception propagates to global handler
- Lingua principale
- TypeScript
- Stelle
- 7.8k
- Fork
- 2.2k
- Merge medio
- 22h 28m
- PR unite (30g)
- 6
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal punto di ingresso @angular/fire/compat/auth e riproduci il problema con createUserWithEmailAndPassword usando un indirizzo e-mail già registrato. Traccia l'errore auth/email-already-in-use intercettato e confronta il comportamento di promise catch con il gestore globale degli errori. Il lavoro è completato quando l'eccezione intercettata non raggiunge più il gestore globale degli errori né la console.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, firebase, typescript
- Ambito
- authentication, frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100