# Buggy code
def http_get(self, path, query_data={}, streamed=False, **kwargs):
    """Make a GET request to the Gitlab server.

    Args:
        path (str): Path or full URL to query ('/projects' or
                    'http://whatever/v4/api/projecs')
        query_data (dict): Data to send as query parameters
        streamed (bool): Whether the data should be streamed
        **kwargs: Extra options to send to the server (e.g. sudo)

    Returns:
        A requests result object is streamed is True or the content type is
        not json.
        The parsed json data otherwise.

    Raises:
        GitlabHttpError: When the return code is not 2xx
        GitlabParsingError: If the json data could not be parsed
    """
    result = self.http_request(
        "get", path, query_data=query_data, streamed=streamed, **kwargs
    )
    if result.headers["Content-Type"] == "application/json" and not streamed:
        try:
            return result.json()
        except Exception:
            raise GitlabParsingError(error_message="Failed to parse the server message")
    else:
        return result


# Traceback (AttributeError)
(venv) ╭─user ~/Repositories/ExampleRepo  ‹feature/ci-ci-testing*›
╰─$ python gitlab_artifact.py                                      1 ↵
Traceback (most recent call last):
File "gitlab_artifact.py", line 60, in <module>
main()
File "gitlab_artifact.py", line 52, in main
a = most_recent_job.artifact("ExampleRepo/cached_service_specs.json")
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/cli.py", line 43, in wrapped_f
return f(*args, **kwargs)
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/exceptions.py", line 251, in wrapped_f
return f(*args, **kwargs)
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/v4/objects.py", line 1397, in artifact
return utils.response_content(result, streamed, action, chunk_size)
File "/Users/lknecht/Repositories/ExampleRepo/venv/lib/python3.7/site-packages/gitlab/utils.py", line 28, in response_content
return response.content
AttributeError: 'list' object has no attribute 'content'

# Fixed code
def http_get(self, path, query_data={}, streamed=False, raw=False, **kwargs):
    """Make a GET request to the Gitlab server.

    Args:
        path (str): Path or full URL to query ('/projects' or
                    'http://whatever/v4/api/projecs')
        query_data (dict): Data to send as query parameters
        streamed (bool): Whether the data should be streamed
        raw (bool): If True do not try to parse the output as json
        **kwargs: Extra options to send to the server (e.g. sudo)

    Returns:
        A requests result object is streamed is True or the content type is
        not json.
        The parsed json data otherwise.

    Raises:
        GitlabHttpError: When the return code is not 2xx
        GitlabParsingError: If the json data could not be parsed
    """
    result = self.http_request(
        "get", path, query_data=query_data, streamed=streamed, **kwargs
    )

    if (
        result.headers["Content-Type"] == "application/json"
        and not streamed
        and not raw
    ):
        try:
            return result.json()
        except Exception:
            raise GitlabParsingError(error_message="Failed to parse the server message")
    else:
        return result