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
Traceback (most recent call last):
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/_session.py", line 108, in request
response.raise_for_status()
File "/usr/lib/python3/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://bugzilla.stage.redhat.com/rest/user?ids=1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/test.py", line 6, in <module>
print(bzapi.logged_in)
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/base.py", line 720, in logged_in
raise e
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/base.py", line 714, in logged_in
self._backend.user_get({"ids": [1]})
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/_backendrest.py", line 182, in user_get
return self._get("/user", paramdict)
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/_backendrest.py", line 63, in _get
return self._op("GET", *args, **kwargs)
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/_backendrest.py", line 58, in _op
response = self._bugzillasession.request(method, fullurl, data=data,
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/_session.py", line 112, in request
raise type(e)(message).with_traceback(sys.exc_info()[2])
File "/usr/src/RPM/BUILD/python-bugzilla/bugzilla/_session.py", line 108, in request
response.raise_for_status()
File "/usr/lib/python3/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://bugzilla.stage.redhat.com/rest/user?ids=1
The problem is that logged_in expects BugzillaError or any other exception having code or faultCode attribute.
The following query crashes:
The problem is that
logged_inexpectsBugzillaErroror any other exception havingcodeorfaultCodeattribute.Bugzilla codes are mapped to HTTP status codes:
https://github.com/bugzilla/bugzilla/blob/7581e08f9136ec32219af6c3192e42ff1c8e9691/Bugzilla/WebService/Constants.pm#L262-L287
But this project don't handle such codes on HTTP errors.
The text was updated successfully, but these errors were encountered: