private int getHttpResponseStatus(boolean isSuccess, Request request,
                                      ErrorMessage mainError, List<ErrorMessage> errors) {
        if (isBenchmarking(request)) return VespaHeaders.getEagerErrorStatus(mainError,errors.iterator());
        return VespaHeaders.getStatus(isSuccess, mainError, errors.iterator());
    }
This sets header and status from special Data items used for the purpose.
Do both at once to avoid traversing the data tree twice.
container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java