From 95637d024819a4d07753b62e5fc645c64f511f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 31 Mar 2021 11:29:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Client/Http2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HttpServer/Client/Http2.php b/HttpServer/Client/Http2.php index cb777551..d77d4bfc 100644 --- a/HttpServer/Client/Http2.php +++ b/HttpServer/Client/Http2.php @@ -136,7 +136,7 @@ class Http2 extends Component /** @var Response $response */ $response = $client->recv(); if ($response === false || $response->statusCode > 200) { - throw new Exception($client->errMsg, $response->statusCode); + throw new Exception($client->errMsg, $response->statusCode ?? 500); } $header = $response->headers['content-type']; if (str_starts_with($header, 'application/json;')) {