Skip to content

Commit

Permalink
fix: account for None in error field of http response
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianAzoitei authored and wendigo committed Jan 20, 2025
1 parent 24cc388 commit 3c745f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trino/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def process(self, http_response: Response) -> TrinoStatus:

http_response.encoding = "utf-8"
response = http_response.json()
if "error" in response:
if "error" in response and response["error"]:
raise self._process_error(response["error"], response.get("id"))

if constants.HEADER_CLEAR_SESSION in http_response.headers:
Expand Down

0 comments on commit 3c745f7

Please sign in to comment.