Add a predicate that returns whether the result has error