Class GremlinError
java.lang.Object
org.apache.tinkerpop.gremlin.server.util.GremlinError
Exception utility class that generates exceptions in the form expected in a
ResponseStatus for different
issues that the server can encounter.-
Method Summary
Modifier and TypeMethodDescriptionstatic GremlinErrorstatic GremlinErrorCreates an error for when a begin request is sent with a user-supplied transaction ID.static GremlinErrorstatic GremlinErrorstatic GremlinErrorio.netty.handler.codec.http.HttpResponseStatusgetCode()static GremlinErrorincorrectParameterFormat(String parameters, GremlinParserException gpe) static GremlinErrorinvalidGremlinType(RequestMessage requestMessage) static GremlinErrorstatic GremlinErrorlongRequest(RequestMessage requestMessage) static GremlinErrormaxTransactionsExceeded(String exceededErrorMessage) Creates an error for when the maximum number of concurrent transactions is exceeded.static GremlinErrorstatic GremlinErrorparameter(int parametersCount, int allowedSize) static GremlinErrorstatic GremlinErrorparsing(GremlinParserException error) static GremlinErrorstatic GremlinErrorscriptEngineNotAvailable(String language) Creates an error for when a requested script engine is not available on the server.static GremlinErrorstatic GremlinErrorstatic GremlinErrorstatic GremlinErrortimeout(RequestMessage requestMessage) static GremlinErrorCreates an error for when commit or rollback is sent without a transaction ID.static GremlinErrortransactionNotFound(String transactionId) Creates an error for when a transaction is not found on the server.static GremlinErrorCreates an error for when the requested graph does not support transactions.static GremlinErrortransactionTimeout(String transactionId, String operation) Creates an error for when a transaction operation times out.static GremlinErrortransactionUnableToStart(String message) Creates an error for when the transaction couldn't begin.static GremlinErrortraversalSourceMismatch(String expected, String actual) Creates an error for when a transactional request uses a different traversal source name than the one bound at begin time.static GremlinError
-
Method Details
-
getCode
public io.netty.handler.codec.http.HttpResponseStatus getCode() -
getMessage
-
getException
-
invalidGremlinType
-
parameter
-
incorrectParameterFormat
-
parameter
-
parameter
-
batchSize
-
binding
-
parsing
-
timeout
-
timedInterruptTimeout
-
rateLimiting
-
serialization
-
wrongSerializer
-
longFrame
-
longRequest
-
temporary
-
failStep
-
general
-
transactionNotFound
Creates an error for when a transaction is not found on the server. This typically occurs when:- The transaction ID was never registered (client didn't call begin)
- The transaction timed out and was automatically rolled back
- The transaction was already committed or rolled back
- Parameters:
transactionId- The transaction ID that was not found- Returns:
- A GremlinError with appropriate message and status code
-
transactionalControlRequiresTransaction
Creates an error for when commit or rollback is sent without a transaction ID.- Returns:
- A GremlinError with appropriate message and status code
-
beginHasTransactionId
Creates an error for when a begin request is sent with a user-supplied transaction ID. The server generates transaction IDs; clients should not provide them on begin.- Returns:
- A GremlinError with appropriate message and status code
-
maxTransactionsExceeded
Creates an error for when the maximum number of concurrent transactions is exceeded.- Parameters:
exceededErrorMessage- The error message containing a maximum number of concurrent transactions- Returns:
- A GremlinError with appropriate message and status code
-
transactionTimeout
Creates an error for when a transaction operation times out.- Parameters:
transactionId- The transaction ID that timed outoperation- The operation that timed out (e.g., "commit", "rollback", "execute")- Returns:
- A GremlinError with appropriate message and status code
-
transactionNotSupported
Creates an error for when the requested graph does not support transactions.- Parameters:
uoe- The exception stating that transactions aren't supported- Returns:
- A GremlinError with appropriate message and status code
-
transactionUnableToStart
Creates an error for when the transaction couldn't begin.- Parameters:
message- The error message (likely from a TransactionException)- Returns:
- A GremlinError with appropriate message and status code
-
scriptEngineNotAvailable
Creates an error for when a requested script engine is not available on the server.- Parameters:
language- the requested script engine name- Returns:
- A GremlinError with appropriate message and status code
-
traversalSourceMismatch
Creates an error for when a transactional request uses a different traversal source name than the one bound at begin time.- Parameters:
expected- The traversal source name bound at transaction beginactual- The traversal source name in the current request- Returns:
- A GremlinError with appropriate message and status code
-