Skip to content

Commit b69679d

Browse files
Fallback to the reason phase
1 parent 1752fba commit b69679d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HttpClient/Plugin/ExceptionThrower.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
4848
$status = $response->getStatusCode();
4949

5050
if ($status >= 400 && $status < 600) {
51-
self::handleError($status, self::getMessage($response));
51+
self::handleError($status, self::getMessage($response) ?: $response->getReasonPhrase());
5252
}
5353

5454
return $response;

0 commit comments

Comments
 (0)