mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-26 06:46:08 +03:00
Throw more detailed generic HTTP error
Take advantage of new response code and body properties to allow better logging.
This commit is contained in:
parent
9fe01151af
commit
ba8e7bda43
@ -131,7 +131,7 @@ class RestClient{
|
||||
throw new MissingEndpoint(EXCEPTION_MISSING_ENDPOINT);
|
||||
}
|
||||
else{
|
||||
throw new GenericHTTPError(EXCEPTION_GENERIC_HTTP_ERROR);
|
||||
throw new GenericHTTPError(EXCEPTION_GENERIC_HTTP_ERROR, $httpResponseCode, $responseObj->getBody());
|
||||
}
|
||||
$result->http_response_code = $httpResponseCode;
|
||||
return $result;
|
||||
|
Loading…
Reference in New Issue
Block a user