|
$message .= ' (' . $responseBody->error->message . ')'; |
Calling ->error->message when error is null emits a warning, which in frameworks like Laravel is turned into an ErrorException.
You should probably check if it's set before accessing it.
In case it's relevant, I ran into this bug when there was a 401 response, so the AuthException was instantiated with a $responseBody that apparently didn't include an error.
ilovepdf-php/src/Exceptions/ExtendedException.php
Line 53 in 7261b81
Calling
->error->messagewhen error is null emits a warning, which in frameworks like Laravel is turned into an ErrorException.You should probably check if it's set before accessing it.
In case it's relevant, I ran into this bug when there was a 401 response, so the
AuthExceptionwas instantiated with a$responseBodythat apparently didn't include an error.