We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e95bbf commit 0456681Copy full SHA for 0456681
trino/exceptions.py
@@ -108,9 +108,9 @@ def message(self) -> str:
108
return self._error.get("message", "Trino did not return an error message")
109
110
@property
111
- def error_location(self) -> Tuple[int, int]:
112
- location = self._error["errorLocation"]
113
- return (location["lineNumber"], location["columnNumber"])
+ def error_location(self) -> Optional[Tuple[int, int]]:
+ location = self._error.get("errorLocation", None)
+ return (location["lineNumber"], location["columnNumber"]) if location else None
114
115
116
def query_id(self) -> Optional[str]:
0 commit comments