From bfacf0dc07cddb05af2325732b0d4e5ac5ba97a6 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Thu, 3 Oct 2024 22:59:49 +0100 Subject: [PATCH] Raise error if invalid metabase credentials are used --- bot/exts/moderation/metabase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bot/exts/moderation/metabase.py b/bot/exts/moderation/metabase.py index cfb4f5f719..82c32c8643 100644 --- a/bot/exts/moderation/metabase.py +++ b/bot/exts/moderation/metabase.py @@ -82,6 +82,7 @@ async def refresh_session(self) -> None: "password": MetabaseConfig.password } async with self.bot.http_session.post(f"{MetabaseConfig.base_url}/api/session", json=data) as resp: + resp.raise_for_status() json_data = await resp.json() self.session_token = json_data.get("id")