File tree Expand file tree Collapse file tree
packages/google-cloud-bigtable/google/cloud/bigtable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,9 +131,12 @@ def _close_batcher(self):
131131 self ._batcher .close ()
132132 except MutationsExceptionGroup as exc_group :
133133 for error in exc_group .exceptions :
134- # Unpack the root cause of the FailedMutationEntryError
135- # and return that error to the user.
136- self ._exceptions .put (error .__cause__ )
134+ # Unpack the root cause of the FailedMutationEntryError and
135+ # return that error to the user. In standard execution paths,
136+ # FailedMutationEntryError always has an Exception cause;
137+ # defensively fall back to error itself if __cause__ is None.
138+ cause = error .__cause__ if error .__cause__ is not None else error
139+ self ._exceptions .put (cause )
137140
138141 def __enter__ (self ):
139142 """Starting the MutationsBatcher as a context manager"""
You can’t perform that action at this time.
0 commit comments