createUserWithEmailAndPassword exception propagates to global handler
- 主要语言
- TypeScript
- 星标
- 7.8k
- 派生
- 2.2k
- 平均合并
- 22 小时 28 分钟
- 30 天内合并 PR
- 6
描述
### 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
贡献指南
调研方向
从 @angular/fire/compat/auth 入口点开始,使用已注册的电子邮件通过 createUserWithEmailAndPassword 重现该问题。跟踪捕获到的 auth/email-already-in-use 错误,并将 promise catch 的行为与全局错误处理器进行比较。当捕获到的异常不再到达全局错误处理器或控制台时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, firebase, typescript
- 领域
- authentication, frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100