diff --git a/python/pyspark/sql/connect/client/core.py b/python/pyspark/sql/connect/client/core.py index 35dcf677fdb70..adba1b42a8bd6 100644 --- a/python/pyspark/sql/connect/client/core.py +++ b/python/pyspark/sql/connect/client/core.py @@ -1786,7 +1786,7 @@ def _fetch_enriched_error(self, info: "ErrorInfo") -> Optional[pb2.FetchErrorDet req.user_context.user_id = self._user_id try: - return self._stub.FetchErrorDetails(req) + return self._stub.FetchErrorDetails(req, metadata=self._builder.metadata()) except grpc.RpcError: return None