From 324fa6e519dae7afe10813d53d2605547208ab1c Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Fri, 1 Mar 2024 18:33:12 +0100 Subject: [PATCH] Cancel if bus not available in client --- src/CommandBusClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CommandBusClient.php b/src/CommandBusClient.php index 880f8de..7048c7c 100644 --- a/src/CommandBusClient.php +++ b/src/CommandBusClient.php @@ -144,7 +144,7 @@ class CommandBusClient implements CommandBusInterface { if (!$this->connection) { return new Promise(function (callable $resolve, callable $canceller) { - $canceller("Not connected to command bus."); + $canceller(new \RuntimeException("Not connected to command bus.")); }); }