Package io.goobi.viewer.exceptions
Class RestApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
io.goobi.viewer.exceptions.RestApiException
- All Implemented Interfaces:
Serializable
Thrown when an error occurs during REST API request processing, carrying an associated HTTP status code.
- Author:
- Florian Alpers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRestApiException(int statusCode) Creates a new RestApiException instance.RestApiException(String message, int statusCode) Creates a new RestApiException instance.RestApiException(String message, Response.Status status) RestApiException(String message, Throwable cause, int statusCode) Creates a new RestApiException instance.RestApiException(String message, Throwable cause, Response.Status status) RestApiException(Throwable cause, int statusCode) Creates a new RestApiException instance.RestApiException(Throwable cause, Response.Status status) -
Method Summary
Modifier and TypeMethodDescriptionintGetter for the fieldstatusCode.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RestApiException
public RestApiException(int statusCode) Creates a new RestApiException instance.- Parameters:
statusCode- HTTP status code of the failed API response
-
RestApiException
Creates a new RestApiException instance.- Parameters:
message- human-readable error descriptioncause- underlying exception that triggered this errorstatusCode- HTTP status code of the failed API response
-
RestApiException
-
RestApiException
Creates a new RestApiException instance.- Parameters:
message- human-readable error descriptionstatusCode- HTTP status code of the failed API response
-
RestApiException
-
RestApiException
Creates a new RestApiException instance.- Parameters:
cause- underlying exception that triggered this errorstatusCode- HTTP status code of the failed API response
-
RestApiException
-
-
Method Details
-
getStatusCode
public int getStatusCode()Getter for the fieldstatusCode.- Returns:
- the HTTP status code associated with this REST API exception
-
getStatus
-