angular / angular/angularfire

createUserWithEmailAndPassword exception propagates to global handler

Aberta
#3,129 3 comentários 4 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
7.8k
Forks
2.2k
Merge médio
22h 28min
PRs com merge (30d)
6

Descrição

### 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 **
image

### 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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo ponto de entrada @angular/fire/compat/auth e reproduza o problema com createUserWithEmailAndPassword usando um e-mail já registrado. Rastreie o erro auth/email-already-in-use capturado e compare o comportamento de promise catch com o manipulador de erros global. A tarefa estará concluída quando a exceção capturada não chegar mais ao manipulador de erros global nem ao console.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
angular, firebase, typescript
Domínio
authentication, frontend
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.