angular / angular/angularfire

createUserWithEmailAndPassword exception propagates to global handler

Đang mở
#3,129 3 bình luận 4 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
7.8k
Fork
2.2k
Merge trung bình
22 giờ 28 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu tại entry point @angular/fire/compat/auth và tái hiện vấn đề với createUserWithEmailAndPassword bằng một email đã được đăng ký. Theo dõi lỗi auth/email-already-in-use đã được bắt và so sánh hành vi của promise catch với trình xử lý lỗi toàn cục. Hoàn tất khi exception đã được bắt không còn đi tới trình xử lý lỗi toàn cục hoặc console.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, firebase, typescript
Lĩnh vực
authentication, frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.