Skip to content

Commit

Permalink
feat: handle non-200 response in fetch_metabase.py (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonylucas74 authored Jul 22, 2024
1 parent b235660 commit 6a3894e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/apps/core/management/commands/fetch_metabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6a3894e

Please sign in to comment.