We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f5cdff commit d716d01Copy full SHA for d716d01
trino/client.py
@@ -787,7 +787,11 @@ def execute(self, additional_http_headers=None) -> TrinoResult:
787
if self.cancelled:
788
raise exceptions.TrinoUserError("Query has been cancelled", self.query_id)
789
790
- response = self._request.post(self._query, additional_http_headers)
+ try:
791
+ response = self._request.post(self._query, additional_http_headers)
792
+ except requests.exceptions.RequestException as e:
793
+ raise trino.exceptions.TrinoConnectionError("failed to execute: {}".format(e))
794
+
795
status = self._request.process(response)
796
self._info_uri = status.info_uri
797
self._query_id = status.id
0 commit comments