Skip to content

Commit e78c7f9

Browse files
fix: raise precise exception in rest_catalog list_namespaces
1 parent 23143e8 commit e78c7f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyiceberg/catalog/rest/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ def list_namespaces(self, namespace: Union[str, Identifier] = ()) -> List[Identi
816816
try:
817817
response.raise_for_status()
818818
except HTTPError as exc:
819-
self._handle_non_200_response(exc, {})
819+
self._handle_non_200_response(exc, {404: NoSuchNamespaceError})
820820

821821
return ListNamespaceResponse.model_validate_json(response.text).namespaces
822822

0 commit comments

Comments
 (0)