aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-06-23 23:17:24 +0100
committerGravatar Gareth Coles <[email protected]>2018-06-23 23:17:24 +0100
commitf5c258a2390595be5725ae92899d127752c472f4 (patch)
tree964e67dc0c306e00cb3b759d2f985b90d2c4b7c2
parent[Events] Fix filter exhaustion on users send (diff)
[Events] Better logging on users send
-rw-r--r--bot/cogs/events.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bot/cogs/events.py b/bot/cogs/events.py
index 6f97d2c35..ccee85263 100644
--- a/bot/cogs/events.py
+++ b/bot/cogs/events.py
@@ -26,6 +26,7 @@ class Events:
async def send_updated_users(self, *users, replace_all=False):
users = list(filter(lambda user: str(Roles.verified) in user["roles"], users))
+ response = None
try:
if replace_all:
@@ -43,7 +44,11 @@ class Events:
return await response.json()
except Exception:
- log.exception(f"Failed to send {len(users)} users")
+ if not response:
+ log.exception(f"Failed to send {len(users)} users")
+ else:
+ log.exception(f"Failed to send {len(users)} users | Body: \n\n{repr(response.body)}")
+
return {}
async def send_delete_users(self, *users):
@@ -56,7 +61,7 @@ class Events:
return await response.json()
except Exception:
- log.exception(f"Failed to send {len(users)} users")
+ log.exception(f"Failed to delete {len(users)} users")
return {}
async def on_command_error(self, ctx: Context, e: CommandError):