File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
ice/src/main/java/com/altinity/ice/cli Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 4141import java .util .Scanner ;
4242import java .util .stream .Collectors ;
4343import org .apache .curator .shaded .com .google .common .net .HostAndPort ;
44+ import org .apache .iceberg .CatalogProperties ;
4445import org .apache .iceberg .catalog .Namespace ;
4546import org .apache .iceberg .catalog .TableIdentifier ;
4647import org .apache .iceberg .rest .RESTCatalog ;
@@ -674,7 +675,18 @@ private RESTCatalog loadCatalog(String configFile) throws IOException {
674675 : e .getKey ())
675676 .sorted ()
676677 .collect (Collectors .joining (", " )));
677- catalog .initialize ("default" , icebergConfig );
678+ String catalogUri = icebergConfig .get (CatalogProperties .URI );
679+ try {
680+ catalog .initialize ("default" , icebergConfig );
681+ } catch (org .apache .iceberg .exceptions .RESTException e ) {
682+ throw new RuntimeException (
683+ String .format (
684+ "Failed to connect to REST catalog at '%s'. "
685+ + "Please check that the catalog server is running and the URL is correct. "
686+ + "Configure via: .ice.yaml 'uri' field, ICE_URI env var, or --config flag." ,
687+ catalogUri ),
688+ e );
689+ }
678690 return catalog ;
679691 }
680692
You can’t perform that action at this time.
0 commit comments