Skip to content

Commit f4d5ed6

Browse files
authored
Merge pull request #2558 from opentensor/feat/roman/improve-invalid-status-error-handler
[SDK] Improve InvalidStatus handler
2 parents 4008488 + 296f76f commit f4d5ed6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bittensor/core/subtensor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,10 @@ def _get_substrate(self, force: bool = False):
263263

264264
except InvalidStatus as error:
265265
logging.critical(
266-
f"[red]You have reached the limit of simultaneous connections to the server.[/red]"
266+
f"Error [red]'{error.response.reason_phrase}'[/red] with status code [red]{error.response.status_code}[/red]."
267267
)
268-
raise InvalidStatus(error.response) from error
268+
logging.debug(f"Server response is '{error.response}'.")
269+
raise
269270

270271
@staticmethod
271272
def config() -> "Config":

0 commit comments

Comments
 (0)