Skip to content

Commit

Permalink
errors from E-conomic are stored in message field instead of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RBech committed Apr 23, 2018
1 parent 3189823 commit b08140b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Economic.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ private function isSuccessful($response, $formattedResponse, $timeout)

if (isset($formattedResponse->message)) {
$this->lastError = sprintf('%d: %s', $formattedResponse->httpStatusCode, $formattedResponse->message);
if (isset($formattedResponse->errors)) {
$this->errors = $formattedResponse->errors;

if (isset($formattedResponse->message)) {
$this->errors[] = $formattedResponse->message;
}
return false;
}
Expand Down

0 comments on commit b08140b

Please sign in to comment.