Skip to content

Commit

Permalink
Add message for JSON Decoding failure
Browse files Browse the repository at this point in the history
  • Loading branch information
visch committed Jan 9, 2025
1 parent 8bc8ac4 commit dc57e90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tap_sunwave/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def validate_response(self, response: requests.Response) -> None:
except requests.exceptions.JSONDecodeError as e:
# Their API returns a 200 status code when there's an error
# We detect that by noticing the response isn't valid JSON
self.response_error_message(response)
raise e
msg self.response_error_message(response)
raise FatalAPIError(msg)

def _cleanup_schema(self, schema_fragment):
if isinstance(schema_fragment, dict):
Expand Down

0 comments on commit dc57e90

Please sign in to comment.