Skip to content

Commit 3c745f7

Browse files
adrianAzoiteiwendigo
authored andcommitted
fix: account for None in error field of http response
1 parent 24cc388 commit 3c745f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trino/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def process(self, http_response: Response) -> TrinoStatus:
676676

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

682682
if constants.HEADER_CLEAR_SESSION in http_response.headers:

0 commit comments

Comments
 (0)