Skip to content

Commit 056afab

Browse files
committed
修正
1 parent aed45a7 commit 056afab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/zerossl/BaseClient.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace axguowen\zerossl;
1313

1414
use axguowen\HttpClient;
15-
use axguowen\httpclient\Error;
1615

1716
abstract class BaseClient
1817
{
@@ -85,7 +84,7 @@ protected function post($path, $body = [])
8584
// 发送请求
8685
$ret = HttpClient::post(self::BASE_URL . $path, $body);
8786
if (!$ret->ok()) {
88-
return [null, new Error($path, $ret)];
87+
return [null, new \Exception($ret->error['info'])];
8988
}
9089
$r = ($ret->body === null) ? [] : $ret->json();
9190
return [$r, null];
@@ -110,7 +109,7 @@ protected function get($path, $query = [])
110109
// 发送请求
111110
$ret = HttpClient::get(self::BASE_URL . $path);
112111
if (!$ret->ok()) {
113-
return [null, new \Exception($ret->error['type'])];
112+
return [null, new \Exception($ret->error['info'])];
114113
}
115114
$r = ($ret->body === null) ? [] : $ret->json();
116115
return [$r, null];

0 commit comments

Comments
 (0)