Skip to content

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:

@stellasphere stellasphere merged commit e0d53e8 into main Feb 13, 2025
8 checks passed
@stellasphere stellasphere deleted the leo/fix-error-handling branch February 13, 2025 11:53
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.

3 participants