public class GraknServerException extends GraknBackendException
Grakn Server Exception
Wraps backend exception which require a status code which needs to be returned to the client.
| Modifier and Type | Method and Description |
|---|---|
static GraknServerException |
authenticationFailure()
Thrown when an incorrect query is used with a REST endpoint
|
static GraknServerException |
contentTypeQueryMismatch(String contentType,
Query query)
Thrown when there is a mismatch between the content type in the request and the query to be executed
|
static GraknServerException |
couldNotDelete(String keyspace)
Thrown when engine cannot delete a keyspace as expected
|
int |
getStatus()
Gets the error status code if one is available
|
static GraknServerException |
internalError(String errorMessage)
Thrown when an internal server error occurs.
|
static GraknServerException |
invalidQuery(String queryType)
Thrown when an incorrect query is used with a REST endpoint
|
static GraknServerException |
invalidQueryExplaination(String query)
Thrown when asked to explain a non-match query
|
static GraknServerException |
invalidTask(String className)
Thrown when attempting to create an invalid task
|
static GraknServerException |
requestMissingBody()
Thrown when a request is missing the body
|
static GraknServerException |
requestMissingBodyParameters(String parameter)
Thrown when a request is missing mandatory parameters in the body
|
static GraknServerException |
requestMissingParameters(String parameter)
Thrown when a request is missing mandatory parameters
|
static GraknServerException |
serverException(int status,
Exception e)
Thrown when the Grakn server has an internal exception.
|
static GraknServerException |
unsupportedContentType(String contentType)
Thrown the content type specified in a request is invalid
|
engineUnavailable, stateStorage, stateStorage, stateStorageMissingId, stateStorageTaskRetrievalFailure, unknownaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic int getStatus()
public static GraknServerException serverException(int status, Exception e)
public static GraknServerException invalidTask(String className)
public static GraknServerException requestMissingParameters(String parameter)
public static GraknServerException requestMissingBodyParameters(String parameter)
public static GraknServerException requestMissingBody()
public static GraknServerException unsupportedContentType(String contentType)
public static GraknServerException contentTypeQueryMismatch(String contentType, Query query)
public static GraknServerException invalidQuery(String queryType)
public static GraknServerException invalidQueryExplaination(String query)
public static GraknServerException authenticationFailure()
public static GraknServerException couldNotDelete(String keyspace)
public static GraknServerException internalError(String errorMessage)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.