From 1b6be865eddeab9199177d74ec07f8cd22051ca4 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Wed, 29 Jul 2020 14:17:44 +0200 Subject: Expect status 400 for duplicates. --- bot/cogs/filter_lists.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/cogs/filter_lists.py b/bot/cogs/filter_lists.py index d1db9830e..9bd2da330 100644 --- a/bot/cogs/filter_lists.py +++ b/bot/cogs/filter_lists.py @@ -64,10 +64,10 @@ class FilterLists(Cog): json=payload ) except ResponseCodeError as e: - if e.status == 500: + if e.status == 400: await ctx.message.add_reaction("❌") log.debug( - f"{ctx.author} tried to add data to a {allow_type}, but the API returned 500, " + f"{ctx.author} tried to add data to a {allow_type}, but the API returned 400, " "probably because the request violated the UniqueConstraint." ) raise BadArgument( -- cgit v1.2.3