Skip to content

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

Closed
@Ch3ri0ur

Description

@Ch3ri0ur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions