Skip to content

Commit 6bdb9f3

Browse files
committed
Addressing review comments
1 parent 5953dea commit 6bdb9f3

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,18 @@
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.*;
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;
3142
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
3243
import org.apache.iceberg.relocated.com.google.common.io.CharStreams;
3344
import org.apache.iceberg.rest.HTTPRequest;
@@ -53,7 +64,6 @@ public class RESTCatalogServlet extends HttpServlet {
5364
.put(NoSuchTableException.class, 404)
5465
.put(NoSuchViewException.class, 404)
5566
.put(NoSuchIcebergTableException.class, 404)
56-
.put(NotFoundException.class, 404)
5767
.put(UnsupportedOperationException.class, 406)
5868
.put(AlreadyExistsException.class, 409)
5969
.put(CommitFailedException.class, 409)

ice/src/main/java/com/altinity/ice/cli/internal/cmd/Describe.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@
2323
import java.util.Map;
2424
import java.util.Set;
2525
import javax.annotation.Nullable;
26-
import org.apache.iceberg.*;
26+
import org.apache.iceberg.DataFile;
27+
import org.apache.iceberg.FileScanTask;
28+
import org.apache.iceberg.Snapshot;
29+
import org.apache.iceberg.TableScan;
2730
import org.apache.iceberg.catalog.Namespace;
2831
import org.apache.iceberg.catalog.TableIdentifier;
32+
import org.apache.iceberg.exceptions.ServiceFailureException;
2933
import org.apache.iceberg.io.CloseableIterable;
3034
import org.apache.iceberg.rest.RESTCatalog;
3135
import org.apache.iceberg.types.Conversions;
@@ -77,8 +81,7 @@ public static void run(RESTCatalog catalog, String target, boolean json, Option.
7781
try {
7882
tableData = gatherTableData(catalog, tableId, optionsSet);
7983
tableMetadata = new Table.Metadata(tableId.toString());
80-
} catch (Exception e) {
81-
e.printStackTrace(System.err);
84+
} catch (ServiceFailureException e) {
8285
tableMetadata = new Table.Metadata(tableId.toString(), e.getMessage());
8386
}
8487

0 commit comments

Comments
 (0)