Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that responsejson is instance of dict #342

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stellasphere
Copy link
Contributor

Description

The current error handling of rfapi.py implies that responsejson is always a dict, however this seems to not be the case and fails without recourse when responsejson is a string.

Therefore, the condition should not only check that responsejson exists, but rather if it is a instance of a dict, since under the condition, it uses methods that are only valid on dictionaries.

This does not change any behavior as the else statement will return the response as a string regardless.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

Tested local example, ran full test suite including test_rfapi.py

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

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.

2 participants