i'm doing a single function to login with Firebase in laravel, it works correctly but i'm trying to capture the error message into a session variable then redirect to the login view but instead it shows the laravel error view. How could i avoid this?. Thanks!
public function login(Request $data) {
$email = $data->input('email');
$password = $data->input('password');
try {
$user = $this->auth->verifyPassword($email, $password);
Session::put('user_uid', $user->uid);
Session::put('user_email', $user->email);
return redirect('/');
} catch (Kreait\Firebase\Exception\Auth\InvalidPassword $e) {
$message = $e->getMessage();
Session::put('message', $message);
return redirect('login');
}
}

InvalidArgumentException, but you are only catching theKreait\Firebase\Exception\Auth\InvalidPasswordexception.