改进 EMQX 支持
This commit is contained in:
parent
7e36657e36
commit
ec10a0abd3
@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
class DeviceController extends Controller
|
class DeviceController extends Controller
|
||||||
{
|
{
|
||||||
//
|
|
||||||
|
|
||||||
public function index(Request $request): RedirectResponse|View
|
public function index(Request $request): RedirectResponse|View
|
||||||
{
|
{
|
||||||
$emqx = new EmqxSupport();
|
$emqx = new EmqxSupport();
|
||||||
|
@ -64,7 +64,7 @@ public function clients($params = [])
|
|||||||
$response = $this->api()->get('clients', $params);
|
$response = $this->api()->get('clients', $params);
|
||||||
} /** @noinspection PhpRedundantCatchClauseInspection */ catch (ConnectionException $e) {
|
} /** @noinspection PhpRedundantCatchClauseInspection */ catch (ConnectionException $e) {
|
||||||
Log::error('emqx connect failed.', [$e]);
|
Log::error('emqx connect failed.', [$e]);
|
||||||
throw new EmqxSupportException('EMQX API 无法连接。');
|
throw new EmqxSupportException('EMQX API 无法连接。' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($response->successful()) {
|
if ($response->successful()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user