Package com.faunadb.client.errors
Class FaunaException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.faunadb.client.errors.FaunaException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestException
,InternalException
,NotFoundException
,PermissionDeniedException
,ResourceNotAvailableException
,StreamingException
,TooManyRequestsException
,TransactionContentionException
,UnauthorizedException
,UnavailableException
,UnknownException
public class FaunaException extends RuntimeException
The base type for all FaunaDB exceptions.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FaunaException(HttpResponses.QueryErrorResponse response)
FaunaException(String message)
FaunaException(String message, Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static String
constructErrorMessage(List<HttpResponses.QueryError> errors)
List<HttpResponses.QueryError>
errors()
Gets the list of errors that caused the query to fail.int
status()
Gets the HTTP status code of the underlying error response.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
FaunaException
public FaunaException(HttpResponses.QueryErrorResponse response)
-
FaunaException
public FaunaException(String message)
-
-
Method Detail
-
errors
public List<HttpResponses.QueryError> errors()
Gets the list of errors that caused the query to fail.- Returns:
- a list of errors
-
status
public int status()
Gets the HTTP status code of the underlying error response.- Returns:
- HTTP status code
-
constructErrorMessage
protected static String constructErrorMessage(List<HttpResponses.QueryError> errors)
-
-