Skip to content

Commit

Permalink
chore: raise for status
Browse files Browse the repository at this point in the history
  • Loading branch information
dantetemplar committed Sep 28, 2024
1 parent 2ec3614 commit bc347a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bot/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def start_registration(self, telegram_id: int) -> tuple[bool | None, Any]:
return False, "A user with the provided telegram is already registered."
if response.status_code == 200:
return True, "A user has been successfully registered."
raise RuntimeError("Unexpected response status")
response.raise_for_status()

async def is_user_exists(self, telegram_id: int) -> bool:
params = {"telegram_id": telegram_id}
Expand Down

0 comments on commit bc347a6

Please sign in to comment.