Skip to content

Commit bda20d6

Browse files
committed
fix: validate exceptions
1 parent 7c65a22 commit bda20d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SAPb1/SAPException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(Response $response){
1919
}
2020

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

0 commit comments

Comments
 (0)