Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

DataSource Exceptions

The DataSource namespace contains exception classes.

All exception classes support built-in methods for returning the error message and exception type. See Exception Class and Built-In Exceptions.

The DataSource namespace contains these exceptions.

Exception Description Methods
DataSource.​DataSource​Exception Throw this exception to indicate that an error occurred while communicating with an external data source. To get the error message and write it to debug log, use the String getMessage().
DataSource.OAuthTokenExpiredException Throw this exception to indicate that an OAuth token has expired. The system then attempts to refresh the token automatically and restart the query, search, or sync operation. To get the error message and write it to debug log, use the String getMessage().