From 7fb0f95df987df598f6812f86564a0ec325344ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 31 Mar 2021 14:12:07 +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 8a4d1cae..6f5828e0 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 ?? 500); + throw new Exception($client->errMsg, $client->errCode); } $header = $response->headers['content-type']; if (str_starts_with($header, 'application/json;')) {