Skip to content

Commit 5de49bb

Browse files
committed
set message for rest error
1 parent 7dcd189 commit 5de49bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Drivers/RestDriver.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private function restCall($uri, $data)
135135
$body = json_decode($rawBody, true);
136136
} catch (RequestException $e) {
137137
$response = $e->getResponse();
138-
$rawBody = is_null($response) ? '{"Status":-98}' : $response->getBody()->getContents();
138+
$rawBody = is_null($response) ? '{"Status":-98,"message":"http connection error"}' : $response->getBody()->getContents();
139139
$body = json_decode($rawBody, true);
140140
}
141141

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

149149
/**
150150
* @param mixed $baseUrl
151+
* @return void
151152
*/
152153
public function setAddress($baseUrl)
153154
{

0 commit comments

Comments
 (0)