Package com.fauna.exception
Class ErrorHandler
- java.lang.Object
-
- com.fauna.exception.ErrorHandler
-
public class ErrorHandler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ErrorHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
handleErrorResponse(int statusCode, QueryResponseWire response, java.lang.String body)
Handles errors based on the HTTP status code and response body.static void
handleQueryFailure(int statusCode, QueryFailure failure)
Handles errors based on the HTTP status code and error code.
-
-
-
Method Detail
-
handleErrorResponse
public static void handleErrorResponse(int statusCode, QueryResponseWire response, java.lang.String body)
Handles errors based on the HTTP status code and response body.- Parameters:
statusCode
- The HTTP status code.response
- The decoded response.- Throws:
AbortException
AuthenticationException
AuthorizationException
ConstraintFailureException
ContendedTransactionException
InvalidRequestException
ProtocolException
QueryCheckException
QueryRuntimeException
QueryTimeoutException
ThrottlingException
-
handleQueryFailure
public static void handleQueryFailure(int statusCode, QueryFailure failure)
Handles errors based on the HTTP status code and error code.- Parameters:
statusCode
- The HTTP status code.failure
- The decoded QueryFailure body.- Throws:
AbortException
AuthenticationException
AuthorizationException
ConstraintFailureException
ContendedTransactionException
InvalidRequestException
QueryCheckException
QueryRuntimeException
QueryTimeoutException
ThrottlingException
-
-