diff --git a/src/Mailgun/Connection/RestClient.php b/src/Mailgun/Connection/RestClient.php index 88bd574..7627fa0 100644 --- a/src/Mailgun/Connection/RestClient.php +++ b/src/Mailgun/Connection/RestClient.php @@ -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; @@ -147,4 +147,4 @@ class RestClient{ } } -?> \ No newline at end of file +?>