Skip to content

Commit a533d1d

Browse files
authored
Merge pull request #581 from opentensor/fix/thewhaleking/err-formatting
Better error formatting
2 parents 48f2a31 + 7bdf47d commit a533d1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bittensor_cli/src/bittensor/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,9 @@ def format_error_message(error_message: Union[dict, Exception]) -> str:
575575
err_type = error_message.get("type", err_type)
576576
err_name = error_message.get("name", err_name)
577577
err_docs = error_message.get("docs", [err_description])
578-
err_description = " ".join(err_docs)
578+
err_description = (
579+
" ".join(err_docs) if not isinstance(err_docs, str) else err_docs
580+
)
579581
err_description += (
580582
f" | Please consult {BT_DOCS_LINK}/errors/subtensor#{err_name.lower()}"
581583
)

0 commit comments

Comments
 (0)