This commit is contained in:
2021-03-31 14:12:07 +08:00
parent e32f476dca
commit 7fb0f95df9
+1 -1
View File
@@ -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;')) {