private static Tuple2<Boolean, Integer> webServiceCodes(ErrorMessage mainError, Iterator<? extends ErrorMessage> allErrors) {
        if (mainError == null) return NO_MATCH;

        Iterator<? extends ErrorMessage> errorIterator = allErrors;
        if (errorIterator != null && errorIterator.hasNext()) {
            while (errorIterator.hasNext()) {
                ErrorMessage error = errorIterator.next();
                Tuple2<Boolean, Integer> status = chooseWebServiceStatus(error);
                if (status.first) {
                    return status;
                }
            }
        } else {
            Tuple2<Boolean, Integer> status = chooseWebServiceStatus(mainError);
            if (status.first) {
                return status;
            }
        }
        return NO_MATCH;
    }
(during normal execution) return 200 unless this is not a success or a 4xx error is requested.

@param isSuccess whether or not the response represents a success
@param mainError the main error of the response, if any
@param allErrors all the errors of the response, if any
@return the status code of the given response
container-core/src/main/java/com/yahoo/container/jdisc/VespaHeaders.java