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 answers an unreadable metadata file with a 500 typed NotFoundException #1841
When the metadata file a table points at cannot be read, the Iceberg REST endpoints answer 500 with "type": "NotFoundException" and the reader's own message, which quotes the path the server keeps the
file at:
{"error":{"message":"Failed to read file: /tmp/marksheet_uniform/metadata/00002-5b7aa739-d074-4764-b49d-ad6c63419576.metadata.json","type":"NotFoundException","code":500}}
The status and the type contradict each other. Iceberg raises NotFoundException for any file a table
points at, and IcebergRestExceptionHandler has no case for it, so the status comes from the internal
error the request became while the type comes from the cause. A client reading that type is told the
thing it asked for is missing -- something it could act on -- when the table is there and the server
could not read it. The message also puts the server's storage layout in a client-facing error.
To Reproduce
Steps to reproduce the behavior:
Start the server and expose a table through the Iceberg REST catalog.
Remove the metadata file the table's metadata pointer names (or point it at a file that is not
there), leaving the table registered.
GET /api/2.1/unity-catalog/iceberg/v1/catalogs/{catalog}/namespaces/{schema}/tables/{table}
answers the 500 above, typed NotFoundException.
Expected behavior
A 500 whose type says a server-side failure, and a message that says the table's Iceberg metadata could
not be read without quoting where the server keeps it. The reason belongs in the server's log.
System [please complete the following information]:
Iceberg's client picks the exception from the status, so a 500 raises ServiceFailureException
whatever the type says; the type is what makes the response contradict itself, and what a client
inspecting the body reads.
Activity
[Server] Report an unreadable table metadata file as the failure it is (