public class ErrorMessage extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ErrorMessage.ErrorMessageBuilder
Provides a fluent API for constructing an
ErrorMessage . |
Constructor and Description |
---|
ErrorMessage()
Construct an error message with no error code or description.
|
ErrorMessage(String message)
Construct an error message with the provided description.
|
ErrorMessage(String error,
String message)
Construct an error message with the provided error code and description.
|
Modifier and Type | Method and Description |
---|---|
static ErrorMessage.ErrorMessageBuilder |
builder()
Create a builder that provides a fluent API for constructing an ErrorMessage.
|
boolean |
equals(Object o) |
String |
getError()
Get the error code.
|
String |
getMessage()
Get the description.
|
int |
hashCode() |
String |
toString() |
public ErrorMessage()
public ErrorMessage(String message)
message
- a user-facing error message explaining why the request failedpublic ErrorMessage(String error, String message)
error
- a single word in camel case that uniquely identifies the error conditionmessage
- a user-facing error message explaining why the request failedpublic String getError()
public String getMessage()
public static ErrorMessage.ErrorMessageBuilder builder()