Skip to content

Three Iceberg REST responses deviate from the spec: parent listing, tableExists status, unreadable body #1800

Closed

Description

@moomindani

Describe the bug

Three small deviations on the Iceberg REST endpoints, all measured on main:

  1. GET /v1/{prefix}/namespaces?parent=<namespace that does not exist> answers 200 with an empty
    list. The spec answers a listing under a namespace that does not exist with 404, and a client
    cannot otherwise tell "this namespace has no children" from "there is no such namespace".
  2. HEAD /v1/{prefix}/namespaces/{namespace}/tables/{table} answers 200 for a table that exists,
    where the spec says 204 with no content. The response also advertises a six-byte text/plain
    body, which a HEAD response must not carry.
  3. A request body the server cannot parse is reported with the Jackson exception's class name and
    the reader's source location in the message, rather than a description of what was wrong.

To Reproduce

Steps to reproduce the behavior:

  1. Start the server and create a table with UniForm Iceberg metadata in unity.default.
  2. List under a parent that does not exist:
$ curl -s -w ' [%{http_code}]' '.../iceberg/v1/catalogs/unity/namespaces?parent=noSuchSchema'
{"namespaces":[],"next-page-token":null} [200]
  1. Ask whether the uniform table exists:
$ curl -sI '.../iceberg/v1/catalogs/unity/namespaces/default/tables/marksheet_uniform'
HTTP/1.1 200 OK
content-type: text/plain; charset=utf-8
content-length: 6
  1. Post an empty metrics body:
$ curl -s -X POST -H 'content-type: application/json' -d '' \
    '.../iceberg/v1/catalogs/unity/namespaces/default/tables/marksheet_uniform/metrics'
{"error":{"message":"failed to parse a JSON document: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]","type":"IllegalArgumentException","code":400}}

Expected behavior

  1. 404 for a parent namespace that does not exist; 200 with an empty list for one that exists, since
    Unity Catalog has no nested namespaces.
  2. 204 with no content when the table exists.
  3. A message that describes the malformed request without naming the classes of the JSON reader.

System [please complete the following information]:

  • OS: macOS 26.5 (Darwin 25.6.0), JDK 17
  • Unity Catalog: main at c9ed6b1, H2 backend. Not environment specific.

Additional context

These are the two adjacent deviations I mentioned in #1796, plus the error message beside them. I
have a fix and tests ready to submit.

Activity

  1. added a commit that references this issue on Sep 14, 2026
    e36e9ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions