Package mindsdb.utils
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
mindsdb.utils.HttpException
- All Implemented Interfaces:
Serializable
Custom exception to handle HTTP errors.
- See Also:
-
Constructor Summary
ConstructorDescriptionHttpException
(int statusCode, String responseBody) Constructs a new HttpException with the specified status code and response body. -
Method Summary
Modifier and TypeMethodDescriptionReturns the response body.int
Returns the HTTP status code.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
Constructs a new HttpException with the specified status code and response body.- Parameters:
statusCode
- the HTTP status coderesponseBody
- the response body
-
-
Method Details
-
getStatusCode
public int getStatusCode()Returns the HTTP status code.- Returns:
- the HTTP status code
-
getResponseBody
Returns the response body.- Returns:
- the response body
-