You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Iceberg REST endpoints answer unimplemented paths with a body Iceberg clients cannot parse #1835
A request to an Iceberg REST path this server does not implement never reaches IcebergRestCatalogService, so IcebergRestExceptionHandler never sees it and Armeria answers with
its own plain-text body -- a Status: line followed by a Description: line, sent as text/plain. Iceberg's ErrorResponseParser cannot read that, so where the REST spec puts an error
document the client gets an unparsable body and fails with a parse error instead of the NotFoundException or RESTException the status calls for.
Clients that read the endpoints list from GET /v1/config never send such a request. Clients
written before that field existed, or that do not consult it, do: dropNamespace and listViews are
both unimplemented here and neither is advertised.
To Reproduce
Steps to reproduce the behavior:
Start the server and create a catalog, a schema, and a table exposed through the Iceberg REST
catalog.
GET /api/2.1/unity-catalog/iceberg/v1/catalogs/{catalog}/namespaces/{schema}/views -- a path
the server does not serve. Response: 404, Content-Type: text/plain; charset=utf-8, body Status: 404\nDescription: Not Found\n
DELETE /api/2.1/unity-catalog/iceberg/v1/catalogs/{catalog}/namespaces/{schema} -- a method
that path does not accept. Response: 405, Content-Type: text/plain; charset=utf-8, body Status: 405\nDescription: Method Not Allowed\n
Hand either body to org.apache.iceberg.rest.responses.ErrorResponseParser.fromJson, which is
what the Iceberg client does with an error response: it throws instead of producing an ErrorResponse.
Expected behavior
An error response from a path under the Iceberg REST API is an Iceberg ErrorResponse document, as
it already is for every request that reaches the service, e.g. {"error":{"message":"Not Found","type":"NotFoundException","code":404}}. Paths outside the Iceberg
API are unaffected.
System [please complete the following information]:
Verified on main at 58d5c7b. The statuses and messages Armeria chooses are correct; only the
rendering is wrong, so this is about the body, not about implementing the missing endpoints.
Activity
[Server] Answer unrouted Iceberg requests with an Iceberg error docum…