1
0
mirror of https://github.com/ihabunek/toot.git synced 2025-04-18 00:48:47 -04:00

Don't swallow random exceptions

Catching any exception here will not display an error if e.g. entitiy
conversion fails.
This commit is contained in:
Ivan Habunek 2025-03-06 08:23:12 +01:00
parent 8016fcdc02
commit d805cdffa5
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C

View File

@ -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}")