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

Method Summary 

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.

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.

Product Retirement Announcement

Salesforce Functions is no longer available for purchase or renewal. To preserve the capabilities that Salesforce Functions provided to your org, deploy an alternative solution before your existing order term ends. See Salesforce Functions Retirement for more information on migrating your functions. Contact your Salesforce Account Executive for more information on Heroku.