im tring to authenticate using firebase in angular project , and im tring to catch errors to prevent them from showing in console but it dont works , any help ?
…code >>
signUp(form: FormGroup) {
return this.auth.createUserWithEmailAndPassword(form.controls['email'].value, form.controls['password'].value)
.then((cred) => {
let $usersRef = doc(this.fireStore, "users", (cred.user?.uid)!);
return setDoc($usersRef, {
fullName: form.controls['fullName'].value,
userName: form.controls['userName'].value,
imgUrl: "imglink/",
});
})
.catch((error) => {
console.error(error.message);
});
}