Skip to content

Commit

Permalink
Always return SalesforceError class, but check if it is initialized w…
Browse files Browse the repository at this point in the history
…ith an actual error with isValid() function
  • Loading branch information
frankkessler committed Sep 13, 2016
1 parent 99cb42e commit b4fc860
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Responses/SalesforceBaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public function __construct($data = [])
{
if (isset($data['raw_sfdc_error'])) {
$this->error = new SalesforceError(json_decode($data['raw_sfdc_error'], true));
} else {
$this->error = new SalesforceError([]);
}

if (isset($data['http_status'])) {
Expand Down

0 comments on commit b4fc860

Please sign in to comment.