Here's an example of an API error response that is not logged (or even reported) by the salesforce module:
Requesting POST /services/data/v27.0/sobjects/CampaignMember HTTP/1.0
{"CampaignId":"xxxx0000000xxxxxxx","ContactId":null}
[{"message":"Attempted to add a campaign member where either the member id 'null' or the campaign id 'xxxx0000000xxxxxxx' is null.","errorCode":"REQUIRED_FIELD_MISSING","fields":[]},{"message":"Attempted to add a campaign member where either the member id 'null' or the campaign id 'xxxx0000000xxxxxxx' is null.","errorCode":"REQUIRED_FIELD_MISSING","fields":[]}]
Comments
Comment #1
wxactly commentedLook into arrays of response data for errors. This is also a start at handling errors more consistently throughout the salesforce api class. Looks like there are probably more opportunities to handle errors consistently within the helper function, but this fixes the bug for now.
Comment #2
levelos commentedComment #3
aaronbaumanJust need to add type-checking on $data, per #2499821: Salesforce::apiCall() has PHP version dependency
Comment #4
aaronbaumanrerolled @ latest dev
Comment #5
gcbComment #6
aaronbaumanrerolled @ dev
Comment #8
aaronbauman