add state.has_errors