My current project involves setting up a login system using Firebase auth in NextJS. Strangely, when I call the login function with incorrect credentials, an error is logged to the console even though my catch statement for handling errors is empty. Is there a way to prevent Firebase from displaying this error message in the console?
Here is the code for the login function handler:
const signinWithEmail = async (email, password) => {
setLoading(true);
signInWithEmailAndPassword(auth, email, password)
.then((response) => {
handleUser(response.user);
Router.push("/");
})
.catch((error) => {
// Do nothing
});
};
The console displays an error (image blurred to hide API key):