Handle when server listing is unavailable
This is a bad place to display a huge error because it is a repeating query. And also this is the first thing people see when opening the app for the first time and it is a bad impression.
This commit is contained in:
parent
08c6509b17
commit
bf76510e8b
|
@ -553,7 +553,13 @@ class Backend:
|
|||
)
|
||||
|
||||
api_list = "https://publiclist.anchel.nl/publiclist.json"
|
||||
response = await session.get(api_list)
|
||||
try:
|
||||
response = await session.get(api_list)
|
||||
except:
|
||||
await session.close()
|
||||
print("Unable to fetch", api_list)
|
||||
return
|
||||
|
||||
coros = []
|
||||
|
||||
for server in (await response.json()):
|
||||
|
|
Loading…
Reference in New Issue
Block a user