Interface DataApiError


@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

Modifier and TypeMethodDescription
java.lang.StringgetErrorCode()Returns the error code for this error.
java.util.List<java.lang.String>getFields()Returns the field names where the error occurred.
java.lang.StringgetMessage()Returns the message of this error.

@Nonnull java.lang.String getMessage()

Returns the message of this error.

Returns: The message of this error.

@Nonnull java.lang.String getErrorCode()

Returns the error code for this error.

Returns: The error code for this error.

@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.