From 3ea23d6533c939f7d2bbf10a35827eb1ed3897b7 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Fri, 1 Mar 2024 18:30:16 +0100 Subject: [PATCH] Fix throws in client --- src/CommandBusClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CommandBusClient.php b/src/CommandBusClient.php index 806e79e..c8d3c98 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) { - throw new \RuntimeException("Not connected to command bus."); + $resolve(new \RuntimeException("Not connected to command bus.")); }); }