Class ErrorResponse
java.lang.Object
io.getlime.core.rest.model.base.response.Response
io.getlime.core.rest.model.base.response.ObjectResponse<Error>
io.getlime.core.rest.model.base.response.ErrorResponse
Class representing an error response.
- Author:
- Petr Dvorak, petr@wultra.com
-
Nested Class Summary
Nested classes/interfaces inherited from class io.getlime.core.rest.model.base.response.Response
Response.Status -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ErrorResponse(@NotNull Error error) Create an error response with provided error as a response object.ErrorResponse(@NotBlank String code, String message) Create a new error response with response object with provided code and error message.ErrorResponse(@NotBlank String code, Throwable t) Create a new error response with response object with provided code and throwable, that is a source for the error message (t.getMessage()).ErrorResponse(@NotBlank String code, Throwable t, String defaultMessage) Create a new error response with response object with provided code and throwable, that is a source for the error message (t.getMessage()). -
Method Summary
Methods inherited from class io.getlime.core.rest.model.base.response.ObjectResponse
getResponseObject, setResponseObject
-
Constructor Details
-
ErrorResponse
public ErrorResponse()Default constructor. -
ErrorResponse
Create a new error response with response object with provided code and error message.- Parameters:
code- Error code.message- Error message.
-
ErrorResponse
Create a new error response with response object with provided code and throwable, that is a source for the error message (t.getMessage()).- Parameters:
code- Error code.t- Throwable, whose message is used as an error message.defaultMessage- Default message, used when Throwable message is null.
-
ErrorResponse
Create a new error response with response object with provided code and throwable, that is a source for the error message (t.getMessage()).- Parameters:
code- Error code.t- Throwable, whose message is used as an error message.
-
ErrorResponse
Create an error response with provided error as a response object.- Parameters:
error- Error response object.
-