Skip to content

Commit

Permalink
set message for rest error
Browse files Browse the repository at this point in the history
  • Loading branch information
RTLer committed Jun 26, 2016
1 parent 7dcd189 commit 5de49bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Drivers/RestDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private function restCall($uri, $data)
$body = json_decode($rawBody, true);
} catch (RequestException $e) {
$response = $e->getResponse();
$rawBody = is_null($response) ? '{"Status":-98}' : $response->getBody()->getContents();
$rawBody = is_null($response) ? '{"Status":-98,"message":"http connection error"}' : $response->getBody()->getContents();
$body = json_decode($rawBody, true);
}

Expand All @@ -148,6 +148,7 @@ private function restCall($uri, $data)

/**
* @param mixed $baseUrl
* @return void
*/
public function setAddress($baseUrl)
{
Expand Down

0 comments on commit 5de49bb

Please sign in to comment.