Skip to content

Commit

Permalink
Merge pull request #2558 from opentensor/feat/roman/improve-invalid-s…
Browse files Browse the repository at this point in the history
…tatus-error-handler

[SDK] Improve InvalidStatus handler
  • Loading branch information
roman-opentensor authored Dec 23, 2024
2 parents 4008488 + 296f76f commit f4d5ed6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bittensor/core/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,10 @@ def _get_substrate(self, force: bool = False):

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

@staticmethod
def config() -> "Config":
Expand Down

0 comments on commit f4d5ed6

Please sign in to comment.