travis-bowen commented on code in PR #4404:
URL: https://github.com/apache/polaris/pull/4404#discussion_r3236491526


##########
runtime/service/src/main/java/org/apache/polaris/service/ratelimiter/RateLimiterFilter.java:
##########
@@ -74,7 +76,16 @@ public void filter(ContainerRequestContext ctx) throws 
IOException {
                         EventAttributes.REQUEST_URI,
                         ctx.getUriInfo().getAbsolutePath().toString())));
       }
-      
ctx.abortWith(Response.status(Response.Status.TOO_MANY_REQUESTS).build());
+      ctx.abortWith(
+          Response.status(Response.Status.TOO_MANY_REQUESTS)
+              .type(MediaType.APPLICATION_JSON_TYPE)
+              .entity(
+                  ErrorResponse.builder()

Review Comment:
   So, it should be possible with changes in the PreMatching filter.
   However, it seems that we already have expectations in polaris of 
ErrorResponse being built even for management APIs.
   
   Here's what I found.
   
https://github.com/apache/polaris/blob/main/runtime/service/src/main/java/org/apache/polaris/service/exception/PolarisExceptionMapper.java#L44-L83
     
   
   What do you think about leaving this to be universal? If not I can try the 
filtering to Iceberg?
   



-- 
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]

Reply via email to