Skip to content

First Release

Latest

Choose a tag to compare

@pattyok pattyok released this 04 Mar 17:56
fix: skip fieldmap when SF API returns errorCode in object_read response

OSF's api_call() returns the response (rather than throwing) when
Salesforce sends a non-success response with error data, such as a
404 'Requested resource does not exist'. The previous check only
tested is_wp_error + data non-empty, which incorrectly treated the
error payload as a successful record match.

Added empty( $sf_object['data']['errorCode'] ) guard so error
responses are skipped and fieldmap iteration continues correctly.