Exceptions
SalesforceWarning
¶
SalesforceError
¶
Bases: Exception
Base class for all Salesforce errors.
Source code in src/aiosalesforce/exceptions.py
MoreThanOneRecordError
¶
Bases: SalesforceError
Raised when more than one record is found by external ID.
DuplicatesDetectedError
¶
Bases: SalesforceError
Raised when duplicates are detected, e.g. when creating a new record.
Source code in src/aiosalesforce/exceptions.py
AuthenticationError
¶
Bases: SalesforceError
Raised when authentication fails.
AuthorizationError
¶
Bases: SalesforceError
Raised when user has insufficient permissions to perform an action.
RequestLimitExceededError
¶
Bases: SalesforceError
Raised when org REST API request limit is exceeded.
NotFoundError
¶
Bases: SalesforceError
Raised when a resource is not found.
ServerError
¶
Bases: SalesforceError
Base class for 5xx errors.
raise_salesforce_error(response)
¶
Given an HTTP response, raise an appropriate SalesforceError.
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/errorcodes.htm
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response |
Response
|
HTTP response. |
required |
Raises:
Type | Description |
---|---|
SalesforceError
|
|