Skip to content

Commit b521856

Browse files
committed
Fix RequestError.parsed().
1 parent 1a91f97 commit b521856

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

zyte_api/_errors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ def __init__(self, *args: Any, **kwargs: Any):
3333
@property
3434
def parsed(self) -> ParsedError:
3535
"""Response as a :class:`ParsedError` object."""
36-
# TODO: self.response_content can be None but ParsedError doesn't expect it
37-
return ParsedError.from_body(self.response_content) # type: ignore[arg-type]
36+
return ParsedError.from_body(self.response_content or b"")
3837

3938
def __str__(self) -> str:
4039
return (

0 commit comments

Comments
 (0)