Skip to content

Debug output line causes AttributeError #55

Description

@myronwalkersonos

This line of code is causing an attibute error.

logger.debug('Response code: %s', request.status_code)

logger.debug('Response code: %s', request.status_code)

request is not guaranteed to have a value and so if the request fails, the code is trying to get the 'status_code' attribute of None which will result in an AttributeError exception being raised.

Example:

AttributeError: 'NoneType' object has no attribute 'status_code'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions