I'm trying to build an app using angular and firebase authentication.
auth.service.ts
async loginWithEmailAndPassword(email: string, password: string) {
try {
await this.auth.signInWithEmailAndPassword(email, password);
} catch(error) {
throw error;
}
}
login-page.component
async loginWithEmailAndPassword() {
if (this.form.status !== 'INVALID') {
try {
await this.authService.loginWithEmailAndPassword(this.email?.value, this.password?.value)
} catch(error) {
console.log('Hello, this is my custom error');
}
}
}
But in the console firebase still throws the error:

Is this the intended behaviour? I thought that try...catching would prevent this.
I even tried removing async await syntax but nothing changed.