createUserWithEmailAndPassword exception propagates to global handler
- Lenguaje dominante
- TypeScript
- Estrellas
- 7.8k
- Forks
- 2.2k
- Merge medio
- 22 h 28 min
- PR fusionados (30 d)
- 6
Descripción
### 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
Guía de contribución
Línea de trabajo
Comienza en el punto de entrada @angular/fire/compat/auth y reproduce el problema con createUserWithEmailAndPassword usando un correo electrónico ya registrado. Sigue el error auth/email-already-in-use capturado y compara el comportamiento de promise catch con el manejador de errores global. Se considera terminado cuando la excepción capturada ya no llega al manejador de errores global ni a la consola.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, firebase, typescript
- Área
- authentication, frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100