danielcweeks commented on code in PR #9853:
URL: https://github.com/apache/iceberg/pull/9853#discussion_r1510022083
##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -1058,12 +1058,17 @@ public List<TableIdentifier> listViews(SessionContext
context, Namespace namespa
public View loadView(SessionContext context, TableIdentifier identifier) {
checkViewIdentifierIsValid(identifier);
- LoadViewResponse response =
- client.get(
- paths.view(identifier),
- LoadViewResponse.class,
- headers(context),
- ErrorHandlers.viewErrorHandler());
+ LoadViewResponse response;
+ try {
+ response =
+ client.get(
+ paths.view(identifier),
+ LoadViewResponse.class,
+ headers(context),
+ ErrorHandlers.viewErrorHandler());
+ } catch (UnsupportedOperationException | RESTException e) {
+ throw new NoSuchViewException("Service does not support views");
Review Comment:
I don't feel this message correctly represents the possible reasons why this
might fail. I'd suggest trying to scope this to 4xx (403, 404) and change it
to "Unable to load view: <view>".
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]