Skip to content

Commit 4e4cd23

Browse files
authored
http rpc error message prompt (#7152)
1 parent 2fb09b4 commit 4e4cd23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CoroutineHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public function __invoke(RequestInterface $request, array $options)
7777
try {
7878
$raw = $client->request($request->getMethod(), $path, $headers, (string) $request->getBody());
7979
} catch (Exception $exception) {
80-
$exception = new ConnectException($exception->getMessage(), $request, null, [
80+
$message = sprintf('Failed to connecting to %s port %s, %s', $host, $port, $exception->getMessage());
81+
$exception = new ConnectException($message, $request, null, [
8182
'errCode' => $exception->getCode(),
8283
]);
8384
return Create::rejectionFor($exception);

0 commit comments

Comments
 (0)