@@ -220,12 +220,12 @@ class GqlError(Exception):
220
220
Further, it is used as the :attr:`__cause__` of GqlError subclasses.
221
221
222
222
Sometimes it is helpful or necessary to traverse the cause chain of
223
- GQLErrors to fully understand or appropriately handle the error. In such
223
+ GqlErrors to fully understand or appropriately handle the error. In such
224
224
cases, users can either traverse the :attr:`__cause__` attribute of the
225
225
error(s) or use the helper method :meth:`.find_by_gql_status`. Note that
226
226
:attr:`__cause__` is a standard attribute of all Python
227
- :class:`Exception`s. Therefore, the cause chain may also contain other
228
- types besides GqlError.
227
+ :class:`BaseException` s: the cause chain may contain other exception types
228
+ besides GqlError.
229
229
230
230
.. versionadded: 5.26
231
231
@@ -241,6 +241,16 @@ class GqlError(Exception):
241
241
_diagnostic_record : dict [str , _t .Any ] # copy to be used externally
242
242
_gql_cause : GqlError | None
243
243
244
+ __cause__ : BaseException | None
245
+ """
246
+ The GqlError's cause, if any.
247
+
248
+ Sometimes it is helpful or necessary to traverse the cause chain of
249
+ GqlErrors to fully understand or appropriately handle the error.
250
+
251
+ .. seealso:: :meth:`.find_by_gql_status`
252
+ """
253
+
244
254
@staticmethod
245
255
def _hydrate_cause (** metadata : _t .Any ) -> GqlError :
246
256
meta_extractor = _MetaExtractor (metadata )
0 commit comments