Nicer and more correct error on image failure

This commit is contained in:
Ville Ranki 2021-05-27 23:36:18 +03:00
parent 4c3a21e562
commit c7697f2994
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -101,7 +101,7 @@ class Bot:
self.uri_cache[cache_key] = list(res) self.uri_cache[cache_key] = list(res)
self.save_settings() self.save_settings()
except UploadFailed: except UploadFailed:
return await self.send_text(room, "sorry. something went wrong uploading the image to matrix server :(") return await self.send_text(room, f"Sorry. Something went wrong fetching {url} and uploading it to the image to matrix server :(")
if not text and not blob: if not text and not blob:
text = f"{url}" text = f"{url}"