diff --git a/marimo/_sql/engines/pyiceberg.py b/marimo/_sql/engines/pyiceberg.py index 4501669e696..f4df867624a 100644 --- a/marimo/_sql/engines/pyiceberg.py +++ b/marimo/_sql/engines/pyiceberg.py @@ -106,8 +106,16 @@ def get_databases( engine=self._engine_name, ) ) - except Exception: - LOGGER.warning("Failed to get databases", exc_info=True) + except Exception as e: + # Check if this is a permission/auth error (e.g., 403 Forbidden) + error_str = str(e).lower() + if "403" in error_str or "forbidden" in error_str: + LOGGER.debug( + "Cannot list namespaces due to insufficient permissions. " + "You can still access tables if you know the namespace name." + ) + else: + LOGGER.warning("Failed to get databases", exc_info=True) return databases