Skip to content

Conversation

@0jcis
Copy link

@0jcis 0jcis commented Oct 31, 2023

Raising AddressLookupException when response.status_code is not 200, a TypeError is raised, because it's trying to get values of keys - 'error' and 'error_description' from response object instead of response_json:

    f'Error "{response["error"]}" ({response.status_code}) from HERE API: {response["error_description"]}'
              ~~~~~~~~^^^^^^^^^
TypeError: 'Response' object is not subscriptable

After fixing and testing the mistake, it works as intended:

Error "Too Many Requests" (429) from HERE API: Rate limit for this service has been reached

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant