Hello!
Apache Iceberg REST Catalog API specification has many handlers that
contain namespace name in the request path or request body.
Some of such handlers regarding this specification can return
NoSuchNamespaceException (with 404 http code)
https://github.com/apache/iceberg/blob/1.8.x/open-api/rest-catalog-open-api.yaml

Examples:
GET /v1/{prefix}/namespaces/{namespace}
GET /v1/{prefix}/namespaces/{namespace}/views
etc

And some of them just return NoSuchTableException/NoSuchViewException even
in case a namespace does not really exist. Examples:
GET, POST, DELETE /v1/{prefix}/namespaces/{namespace}/tables/{table}
GET, POST, DELETE /v1/{prefix}/namespaces/{namespace}/views/{view}
GET /v1/{prefix}/namespaces/{namespace}/tables/{table}/credentials
POST /v1/{prefix}/namespaces/{namespace}/tables/{table}/metrics

We've found this situation during implementation of our own Iceberg REST
Catalog
https://github.com/apache/iceberg/issues/12466
because first of all we check the existence of a namespace and then go
deeper to the hierarchy.

Is there any reason why some handlers don't return NoSuchNamespaceException
and can we add it to the specification?

Reply via email to