diff --git a/trino/client.py b/trino/client.py index 29692056..a122702f 100644 --- a/trino/client.py +++ b/trino/client.py @@ -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: