Skip to content

Commit 313ba9a

Browse files
authored
Raise JIRAError when no user found (#1383)
raise error if no user found
1 parent c8945f3 commit 313ba9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jira/client.py

+3
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,9 @@ def _get_user_id(self, user: Optional[str]) -> Optional[str]:
18031803
else:
18041804
users = self.search_users(user=user, maxResults=20)
18051805

1806+
if len(users) < 1:
1807+
raise JIRAError(f"No matching user found for: '{user}'")
1808+
18061809
matches = []
18071810
if len(users) > 1:
18081811
matches = [u for u in users if self._get_user_identifier(u) == user]

0 commit comments

Comments
 (0)