Skip to content

Commit

Permalink
Properly log and raise Errors
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Vroon <erik.vroon22@gmail.com>
  • Loading branch information
robigan and evroon authored Feb 21, 2024
1 parent 4e63435 commit 68f13ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ async def register_user(email, password, name) -> None:
account_type=UserAccountType.REGULAR,
)
if await check_whether_email_is_in_use(email):
raise AssertionError("Email address already in use")
logger.error("Email address already in use")
raise SystemExit(1)
user_created = await create_user(user)
assert_some(user_created.id)
logger.info(f"Created user with id: {user_created.id}")
Expand Down

0 comments on commit 68f13ec

Please sign in to comment.