we only need the `has_errors` inside the `if`