diff --git a/backend/apps/core/management/commands/fetch_metabase.py b/backend/apps/core/management/commands/fetch_metabase.py index b4447d5d..a81ab67b 100644 --- a/backend/apps/core/management/commands/fetch_metabase.py +++ b/backend/apps/core/management/commands/fetch_metabase.py @@ -54,6 +54,9 @@ def get_databases(self, token: str): response = requests.get(BASE_URL + "/api/database", headers=headers) + if response.status_code != 200: + raise Exception(response.text) + return response.json()["data"] def get_tables(self, token: str, database_id: int):