Hi everyone,

I'd like to propose a small addition to the REST catalog spec: documenting
HTTP 404 as a valid response for the /v1/config endpoint when a requested
warehouse does not exist.

The Rationale

The /v1/config endpoint allows an optional query parameter for a warehouse
identifier, e.g. /v1/config?warehouse=mywarehouse.  But the openapi spec
does not specify what should happen if the requested warehouse does not
exist.

Snowflake Open Catalog already returns a 404 for non-existent warehouses:

```
{
  "error": {
    "message": "Unable to find warehouse NONEXISTENT_WAREHOUSE_12345",
    "type": "NotFoundException",
    "code": 404
  }
}
```

This proposal therefore formalizes what Snowflake Open Catalog is already
doing in production. It seems sensible to formalize the 404 response code,
because this is consistent with other Iceberg REST endpoints which allow a
404 response code for missing resources (tables, namespaces, views).

The Proposed Solution (PR-15746)

Add a NoSuchWarehouseResponse to the OpenAPI spec for the /v1/config
endpoint, formalizing 404 as the response when a warehouse does not
exist. You can view the PR here:
https://github.com/apache/iceberg/pull/15746 .

Looking forward to your thoughts.

Best,
Oguzhan

Reply via email to