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
public class ErrorResponse extends ObjectResponse<Error>
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 -
Field Summary
-
Constructor Summary
Constructors Constructor Description ErrorResponse()Default constructor.ErrorResponse(@NotBlank java.lang.String code, java.lang.String message)Create a new error response with response object with provided code and error message.ErrorResponse(@NotBlank java.lang.String code, java.lang.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(@NotNull Error error)Create an error response with provided error as a response object. -
Method Summary
Methods inherited from class io.getlime.core.rest.model.base.response.ObjectResponse
getResponseObject, getStatus, setResponseObject, setStatusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ErrorResponse
public ErrorResponse()Default constructor. -
ErrorResponse
public ErrorResponse(@NotBlank @NotBlank java.lang.String code, java.lang.String message)Create a new error response with response object with provided code and error message.- Parameters:
code- Error code.message- Error message.
-
ErrorResponse
public ErrorResponse(@NotBlank @NotBlank java.lang.String code, java.lang.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()).- 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.
-