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

wxactly’s picture

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

levelos’s picture

Status: Active » Needs review
aaronbauman’s picture

Status: Needs review » Needs work

Just need to add type-checking on $data, per #2499821: Salesforce::apiCall() has PHP version dependency

aaronbauman’s picture

Version: 7.x-3.1 » 7.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.57 KB

rerolled @ latest dev

gcb’s picture

Version: 7.x-1.x-dev » 7.x-3.x-dev
aaronbauman’s picture

StatusFileSize
new1.59 KB

rerolled @ dev

  • aaronbauman committed 4e3be23 on 7.x-3.x
    Issue #2535420 by aaronbauman, wxactly: When the Salesforce API returns...
aaronbauman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.