public static int getStatus(boolean isSuccess, ErrorMessage mainError, Iterator<? extends ErrorMessage> allErrors) {
        // Do note, SearchResponse has its own implementation of isSuccess()
        if (isSuccess) {
            Tuple2<Boolean, Integer> status = webServiceCodes(mainError, allErrors);
            if (status.first) {
                return status.second;
            } else {
                return Response.Status.OK;
            }
        }
        return getEagerErrorStatus(mainError, allErrors);
    }
(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