Package org.stellar.sdk.exception
Class BadRequestException
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.BadRequestException
- All Implemented Interfaces:
Serializable
Exception thrown when a bad request is made to the server. This typically indicates a client-side
error (4xx HTTP status codes).
- See Also:
-
Constructor Summary
ConstructorDescriptionBadRequestException
(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
-
BadRequestException
public BadRequestException(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.
-