private static Tuple2<Boolean, Integer> chooseWebServiceStatus(ErrorMessage error) {
        if (isHttpStatusCode(error.getCode()))
            return new Tuple2<>(true, error.getCode());
        if (error.getCode() == FORBIDDEN.code)
            return new Tuple2<>(true, Response.Status.FORBIDDEN);
        if (error.getCode() == UNAUTHORIZED.code)
            return new Tuple2<>(true, Response.Status.UNAUTHORIZED);
        if (error.getCode() == NOT_FOUND.code)
            return new Tuple2<>(true, Response.Status.NOT_FOUND);
        if (error.getCode() == BAD_REQUEST.code)
            return new Tuple2<>(true, Response.Status.BAD_REQUEST);
        if (error.getCode() == INTERNAL_SERVER_ERROR.code)
            return new Tuple2<>(true, Response.Status.INTERNAL_SERVER_ERROR);
        if (error.getCode() == INSUFFICIENT_STORAGE.code)
            return new Tuple2<>(true, Response.Status.INSUFFICIENT_STORAGE);
        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