Include status code in APIError and handle APIError in the loop (#4995)

This commit is contained in:
jack1142
2021-05-23 16:23:58 +02:00
committed by GitHub
parent b89c43eb0f
commit c4a9d97a4b
3 changed files with 22 additions and 6 deletions

View File

@@ -766,6 +766,13 @@ class Streams(commands.Cog):
stream.messages.clear()
await self.save_streams()
except APIError as e:
log.error(
"Something went wrong whilst trying to contact the stream service's API.\n"
"Raw response data:\n%r",
e,
)
continue
else:
if stream.messages:
continue