diff --git a/trino/client.py b/trino/client.py index da5e4047..62a7059a 100644 --- a/trino/client.py +++ b/trino/client.py @@ -621,7 +621,7 @@ def process(self, http_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: