diff --git a/src/Plivo/BaseClient.php b/src/Plivo/BaseClient.php index e97c492d..8dc7d345 100644 --- a/src/Plivo/BaseClient.php +++ b/src/Plivo/BaseClient.php @@ -168,7 +168,7 @@ public function sendRequest(PlivoRequest $request, $url = null) static::$requestCount++; if (!$plivoResponse->ok()) { - return $plivoResponse; + throw $plivoResponse->getThrownException(); } return $plivoResponse;