@Immutable public interface DataApiError
Represents an error from the Data API. Contains detailed information about the underlying error.
All implementations must be immutable and therefore thread-safe.
See Also: REST API Developer Guide - Status Codes and Error Responses
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getErrorCode() |
Returns the error code for this error. |
java.util.List<java.lang.String> |
getFields() |
Returns the field names where the error occurred. |
java.lang.String |
getMessage() |
Returns the message of this error. |
Method Details
getMessage
@Nonnull java.lang.String getMessage()
Returns the message of this error.
Returns: The message of this error.
getErrorCode
@Nonnull java.lang.String getErrorCode()
Returns the error code for this error.
Returns: The error code for this error.
getFields
@Nonnull java.util.List<java.lang.String> getFields()
Returns the field names where the error occurred. Might be empty for errors that are not related to a specific field.
Returns: The field names where the error occurred.