Skip to content

Commit

Permalink
Check for empty responses (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fokko committed Oct 15, 2023
1 parent 7e0041f commit b026c5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyiceberg/catalog/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ def _split_identifier_for_json(self, identifier: Union[str, Identifier]) -> Dict

def _handle_non_200_response(self, exc: HTTPError, error_handler: Dict[int, Type[Exception]]) -> None:
exception: Type[Exception]

if exc.response is None:
raise ValueError("Did not receive a response")

code = exc.response.status_code
if code in error_handler:
exception = error_handler[code]
Expand Down

0 comments on commit b026c5d

Please sign in to comment.