messageBus = $queryBus; } public function query(Query $query): mixed { try { return $this->handle($query); } catch (HandlerFailedException $e) { throw first($e->getNestedExceptions()); } } } //end-snippet