You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered some failures in my testing yesterday where Jira was intermittently failing to find a user who exists. The error is no longer occurring, but I'm theorizing that I was getting rate-limiting errors on the query.
The problem is that the call to search_users just returned an empty list. From what I can see, the call stack is search_users -> _fetch_page -> _get_json, which does not seem to check the status code of the get call, but instead blindly calls json_loads on the response, which will result in an empty list. Since an empty list is a valid response in the case where a successful search doesn't find a user, I can't differentiate between the case where the user isn't found and when the search failed because of some error.
Thanks!
Is there an existing issue for this?
I have searched the existing issues
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
No response
jira-python version
3.6.0
Python Interpreter version
3.9
Which operating systems have you used?
Linux
macOS
Windows
Reproduction steps
# 1. Given a Jira client instancejira: JIRA# 2. When I call search_users with a user that I know existsresult=jira.search_users(query='I_exist@company.com')
# 3. But we are currently being rate-limited by Atlassian cloud# At this point result is an empty list -- but I would expect an exception to have been raised.
Bug summary
I encountered some failures in my testing yesterday where Jira was intermittently failing to find a user who exists. The error is no longer occurring, but I'm theorizing that I was getting rate-limiting errors on the query.
The problem is that the call to search_users just returned an empty list. From what I can see, the call stack is search_users -> _fetch_page -> _get_json, which does not seem to check the status code of the get call, but instead blindly calls json_loads on the response, which will result in an empty list. Since an empty list is a valid response in the case where a successful search doesn't find a user, I can't differentiate between the case where the user isn't found and when the search failed because of some error.
Thanks!
Is there an existing issue for this?
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
No response
jira-python version
3.6.0
Python Interpreter version
3.9
Which operating systems have you used?
Reproduction steps
Stack trace
Expected behaviour
If the HTTP response code is not 2xx, I would expect a JIRAError exception to be raised
Additional Context
No response
The text was updated successfully, but these errors were encountered: