Skip to content

Commit

Permalink
🐛 fix: skip completely empty responses
Browse files Browse the repository at this point in the history
  • Loading branch information
ljnsn committed Jan 23, 2024
1 parent 5c4f7f9 commit 3c49c0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dsws_client/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ def responses_to_records(
"""Parse a list of DSDataResponse objects into a list of records."""
parsed_response = ParsedResponse()
for response in responses:
_parsed_response = parse_response(response, process_strings=process_strings)
try:
_parsed_response = parse_response(response, process_strings=process_strings)
except InvalidResponseError as exc:
logger.warning("Invalid response, skipping")
logger.debug(exc)
continue
parsed_response.records.extend(_parsed_response.records)
parsed_response.errors.extend(_parsed_response.errors)
parsed_response.meta = parsed_response.meta.merge(_parsed_response.meta)
Expand Down

0 comments on commit 3c49c0c

Please sign in to comment.