From d805cdffa5bf42c7ee7614b0bfcede646947a34d Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Thu, 6 Mar 2025 08:23:12 +0100 Subject: [PATCH] Don't swallow random exceptions Catching any exception here will not display an error if e.g. entitiy conversion fails. --- toot/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toot/auth.py b/toot/auth.py index ef84652..aad25dc 100644 --- a/toot/auth.py +++ b/toot/auth.py @@ -8,7 +8,7 @@ def find_instance(base_url: str) -> Instance: try: instance = api.get_instance(base_url).json() return from_dict(Instance, instance) - except Exception: + except ApiError: raise ConsoleError(f"Instance not found at {base_url}")