aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-04-19 14:08:07 +0100
committerGravatar Chris Lovering <[email protected]>2022-04-19 14:08:07 +0100
commit56695df60b32d455a5a69ca430ee1ac1d4b54218 (patch)
tree240beb543f2e047fd94c248fe57805d371809ca8
parentEmpty embed descriptions are now None, rather than a sentinal (diff)
Ensure error has an attr before checking the value in metabase
-rw-r--r--bot/exts/moderation/metabase.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/metabase.py b/bot/exts/moderation/metabase.py
index 9e59f54a0..0ca9fd4a5 100644
--- a/bot/exts/moderation/metabase.py
+++ b/bot/exts/moderation/metabase.py
@@ -42,7 +42,7 @@ class Metabase(Cog):
async def cog_command_error(self, ctx: Context, error: Exception) -> None:
"""Handle ClientResponseError errors locally to invalidate token if needed."""
- if not isinstance(error.original, ClientResponseError):
+ if not hasattr(error, "original") or not isinstance(error.original, ClientResponseError):
return
if error.original.status == 403: