fix: 修复异常类型

This commit is contained in:
zyimm 2023-10-17 11:41:12 +08:00
parent 6d60eb4891
commit 5cfe9bab27

View File

@ -8,6 +8,7 @@ use GuzzleHttp\Pool;
use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response; use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Throwable;
use tm\xls\rocketMq\thinkphp\connection\Connection; use tm\xls\rocketMq\thinkphp\connection\Connection;
class Producer class Producer
@ -52,7 +53,7 @@ class Producer
$index => $response->getBody()->getContents() $index => $response->getBody()->getContents()
]; ];
}, },
'rejected' => function (RequestException $reason, $index) { 'rejected' => function (Throwable $reason, $index) {
//todo 失败 //todo 失败
return [ return [
$index => $reason->getMessage() $index => $reason->getMessage()