Package org.stellar.sdk.exception
Class BadResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.stellar.sdk.exception.SdkException
org.stellar.sdk.exception.NetworkException
org.stellar.sdk.exception.BadResponseException
- All Implemented Interfaces:
Serializable
Exception thrown when a bad response is received from the server. This typically indicates a
server-side error (5xx HTTP status codes).
- See Also:
-
Constructor Summary
ConstructorDescriptionBadResponseException
(int code, String body, Problem problem, SubmitTransactionAsyncResponse submitTransactionAsyncProblem) Constructs a new BadRequestException. -
Method Summary
Modifier and TypeMethodDescriptionThe parsed problem details, if available.The parsed async transaction submission problem details.Methods inherited from class org.stellar.sdk.exception.NetworkException
getBody, getCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BadResponseException
public BadResponseException(int code, @Nullable String body, @Nullable Problem problem, @Nullable SubmitTransactionAsyncResponse submitTransactionAsyncProblem) Constructs a new BadRequestException.- Parameters:
code
- The HTTP status code of the responsebody
- The raw body of the responseproblem
- The parsed problem details, may be null if parsing failed
-
-
Method Details
-
getProblem
The parsed problem details, if available. -
getSubmitTransactionAsyncProblem
The parsed async transaction submission problem details.This field is only present when the exception is thrown as a result of calling the "Submit Transaction Asynchronously" API endpoint and the server returned an error response. In other cases, it will be null.
-