From 2e1218d1eb0e44567e1beb873ded3385a915f1d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20=C5=BBebrak?= <mzebrak@syncad.com>
Date: Fri, 7 Mar 2025 14:47:50 +0100
Subject: [PATCH] Make World.node property raise ProfileNotLoadedError instead
 of AssertionError

---
 clive/__private/core/world.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clive/__private/core/world.py b/clive/__private/core/world.py
index 36919d8957..d154210efe 100644
--- a/clive/__private/core/world.py
+++ b/clive/__private/core/world.py
@@ -83,8 +83,8 @@ class World:
     @property
     def node(self) -> Node:
         """Node shouldn't be used for direct API calls in CLI/TUI. Instead, use commands which also handle errors."""
-        message = "Node is not available. It requires profile to be loaded. Is the profile available?"
-        assert self._node is not None, message
+        if self._node is None:
+            raise ProfileNotLoadedError
         return self._node
 
     @property
-- 
GitLab