danielcweeks commented on code in PR #10929:
URL: https://github.com/apache/iceberg/pull/10929#discussion_r1757219098


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -394,6 +445,10 @@ private LoadTableResponse loadInternal(
 
   @Override
   public Table loadTable(SessionContext context, TableIdentifier identifier) {
+    if (!endpoints.contains(Endpoint.V1_LOAD_TABLE)) {
+      throw new NoSuchTableException("Unable to load table %s.%s", name(), 
identifier);

Review Comment:
   It also looks like we have a few places where we're using `check` vs 
`contains` because we need to throw a specific exception.  What if we just make 
this use a supplier so that we can be consistent about checks:
   
   ```java
   Endpoint.check(endpoints, Endpoint.V1_LOAD_TABLE, () -> new 
NoSuchTableException(...));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to