This is an automated email from the ASF dual-hosted git repository.

hope pushed a commit to branch release-1.4
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/release-1.4 by this push:
     new e0fcd55158 fix: load_snapshot should return None for any 404, not just 
SNAPSHOT type
e0fcd55158 is described below

commit e0fcd551583398886785535f6a0d00faf3486100
Author: xiaohongbo.xhb <[email protected]>
AuthorDate: Thu Apr 2 19:16:41 2026 +0800

    fix: load_snapshot should return None for any 404, not just SNAPSHOT type
    
    GetTableSnapshot returns 404 for newly created tables that haven't
    committed any snapshot yet. Bennett may return resource_type as TABLE
    instead of SNAPSHOT in the error response. Treating this as
    TableNotExistException causes commit failures for new tables.
---
 paimon-python/pypaimon/catalog/rest/rest_catalog.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/paimon-python/pypaimon/catalog/rest/rest_catalog.py 
b/paimon-python/pypaimon/catalog/rest/rest_catalog.py
index fc2f516a8b..00bdd6428d 100644
--- a/paimon-python/pypaimon/catalog/rest/rest_catalog.py
+++ b/paimon-python/pypaimon/catalog/rest/rest_catalog.py
@@ -358,10 +358,8 @@ class RESTCatalog(Catalog):
             identifier = Identifier.from_string(identifier)
         try:
             return self.rest_api.load_snapshot(identifier)
-        except NoSuchResourceException as e:
-            if e.resource_type == ErrorResponse.RESOURCE_TYPE_SNAPSHOT:
-                return None
-            raise TableNotExistException(identifier) from e
+        except NoSuchResourceException:
+            return None
         except ForbiddenException as e:
             raise TableNoPermissionException(identifier) from e
 

Reply via email to