public static GremlinError longRequest(final RequestMessage requestMessage ) {
        final String message = String.format("The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM, please split it into multiple smaller statements - %s", requestMessage.trimMessage(1021));
        return new GremlinError(HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE, message, "RequestEntityTooLargeException");
    }
Exception utility class that generates exceptions in the form expected in a {@code ResponseStatus} for different
issues that the server can encounter.
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinError.java