Skip to content

Commit f54c3ac

Browse files
committed
Propagating correct 404 to the REST clients in case of Iceberg NotFoundException
1 parent d56b849 commit f54c3ac

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

ice-rest-catalog/src/main/java/com/altinity/ice/rest/catalog/internal/rest/RESTCatalogServlet.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,7 @@
2727
import java.util.stream.Collectors;
2828
import org.apache.hc.core5.http.ContentType;
2929
import org.apache.hc.core5.http.HttpHeaders;
30-
import org.apache.iceberg.exceptions.AlreadyExistsException;
31-
import org.apache.iceberg.exceptions.CommitFailedException;
32-
import org.apache.iceberg.exceptions.CommitStateUnknownException;
33-
import org.apache.iceberg.exceptions.ForbiddenException;
34-
import org.apache.iceberg.exceptions.NamespaceNotEmptyException;
35-
import org.apache.iceberg.exceptions.NoSuchIcebergTableException;
36-
import org.apache.iceberg.exceptions.NoSuchNamespaceException;
37-
import org.apache.iceberg.exceptions.NoSuchTableException;
38-
import org.apache.iceberg.exceptions.NoSuchViewException;
39-
import org.apache.iceberg.exceptions.NotAuthorizedException;
40-
import org.apache.iceberg.exceptions.UnprocessableEntityException;
41-
import org.apache.iceberg.exceptions.ValidationException;
30+
import org.apache.iceberg.exceptions.*;
4231
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
4332
import org.apache.iceberg.relocated.com.google.common.io.CharStreams;
4433
import org.apache.iceberg.rest.HTTPRequest;
@@ -64,6 +53,7 @@ public class RESTCatalogServlet extends HttpServlet {
6453
.put(NoSuchTableException.class, 404)
6554
.put(NoSuchViewException.class, 404)
6655
.put(NoSuchIcebergTableException.class, 404)
56+
.put(NotFoundException.class, 404)
6757
.put(UnsupportedOperationException.class, 406)
6858
.put(AlreadyExistsException.class, 409)
6959
.put(CommitFailedException.class, 409)

0 commit comments

Comments
 (0)