kopia lustrzana https://github.com/ihabunek/toot
Don't swallow random exceptions
Catching any exception here will not display an error if e.g. entitiy conversion fails.master
rodzic
8016fcdc02
commit
d805cdffa5
|
@ -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}")
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue