public static Response badRequest(final String msg, final Object... args) {
        return Response
                .status(Response.Status.BAD_REQUEST)
                .entity(LogUtil.message(msg, args))
                .type(MediaType.TEXT_PLAIN)
                .build();
    }
Used to validate a request argument and throw a {@link BadRequestException} if it is null
stroom-util/src/main/java/stroom/util/rest/RestUtil.java