flyrain commented on code in PR #402:
URL: https://github.com/apache/polaris/pull/402#discussion_r1816974065
##########
polaris-service/src/main/java/org/apache/polaris/service/exception/IcebergExceptionMapper.java:
##########
@@ -79,6 +89,7 @@ public Response toResponse(RuntimeException runtimeException)
{
case RESTException e ->
Response.Status.SERVICE_UNAVAILABLE.getStatusCode();
case IllegalArgumentException e ->
Response.Status.BAD_REQUEST.getStatusCode();
case UnsupportedOperationException e ->
Response.Status.NOT_ACCEPTABLE.getStatusCode();
+ case Exception e when isAccessDenied(e) ->
Response.Status.FORBIDDEN.getStatusCode();
Review Comment:
Curious if there is any specific exception type(e.g., GCS Exception, or
Azure Exception) we can apply, as `Exception` covers a large amount of
exception, they may also contain phrases like `forbidden`, `access denied`.
--
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]