Skip to content

Checking 403 reason assumes decoded data is a dict #442

@stevedalton

Description

@stevedalton

When checking for the 403 'reason' here, there's an implicit assumption the data is already a dictionary. That's not always true: for example, here's some decoded data from the Google Monitoring API:

[{
  u'error': {
    u'status': u'PERMISSION_DENIED', 
    u'code': 403, 
    u'errors': [{...}
}]

This is (for whatever reason) a list, and so the code linked above fails with a TypeError (trying to index a list with a string), which is an uncaught exception.

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.status: acknowledgedtriage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions