Skip to content

Commit

Permalink
Propagate specific login errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek-urban committed Jul 12, 2024
1 parent b72e8d2 commit 7f2e15f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rocketchat_async/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def _get_request_msg(msg_id, username, password):

@staticmethod
def _parse(response):
if "error" in response:
raise RuntimeError(response['error']['reason'])
return response['result']['id']

@classmethod
Expand Down

0 comments on commit 7f2e15f

Please sign in to comment.