atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 643 forks source link

AttributeError: 'list' object has no attribute 'items' in raise_for_status in rest_client.py when authentication failed. #1230

Closed Ch3ri0ur closed 9 months ago

Ch3ri0ur commented 10 months ago

We noticed an error in one of our pipelines:

File "/var/jenkins_home/ws/.python/python-3.8.10-embed-unix-pip/venvs/aec70c2b05af8c0cf71c90fd476e564f827ae9c8/lib/python3.8/site-packages/atlassian/rest_client.py", line 480, in raise_for_status for k, v in j.get("errors", dict()).items() AttributeError: 'list' object has no attribute 'items'

I debugged the responsible function call and the variable j in this case was:

{'errors': [{'context': None, 'message': 'Authentication failed. Please check your credentials and try again.', 'exceptionName': 'com.atlassian.bitbucket.auth.IncorrectPasswordAuthenticationException'}]}

Bitbucket Version: Atlassian Bitbucket v7.21.11 Version of this library: 3.38.0

gonchik commented 10 months ago

Hi @Ch3ri0ur , as I see @sreway working under that. if you have some ideas feel free to provide PR

Spacetown commented 9 months ago

@gonchik This can be closed