Skip to content

Commit

Permalink
fix: validate exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimerson21 committed Mar 11, 2022
1 parent 7c65a22 commit bda20d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SAPb1/SAPException.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(Response $response){
}

if($response->getHeaders('Content-Type') == 'application/json'){
$message = $response->getJson()->error->message->value;
$message = $response->getJson()->error->message->value ?? $response->getJson()->error->message;
$erroCode = $response->getJson()->error->code;
}

Expand Down

0 comments on commit bda20d6

Please sign in to comment.