Skip to content

Commit

Permalink
review: catch migrator init exception
Browse files Browse the repository at this point in the history
  • Loading branch information
abulte committed Sep 11, 2024
1 parent 92e1b19 commit 84f5390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ecospheres_migrator/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def login():
if not username or not password or not url:
abort(400, "Missing login parameter(s)")

migrator = Migrator(url=url, username=username, password=password)
try:
migrator = Migrator(url=url, username=username, password=password)
gn_info = migrator.gn.info()
except requests.exceptions.RequestException as e:
flash(f"Problème d'authentification ({e})", "error")
Expand Down

0 comments on commit 84f5390

Please sign in to comment.