laserninja opened a new issue, #11581:
URL: https://github.com/apache/gravitino/issues/11581

   ### What would you like to be improved?
   `AuthenticationFilter` rejects unauthenticated requests with 
`response.sendError(status, message)`, which triggers Jetty's default HTML 
error page and bypasses `IcebergExceptionMapper`. Iceberg REST clients expect a 
JSON `ErrorResponse` body for all error responses, so they may fail to parse 
401/403 responses and surface an opaque error.
   
   ### How should we improve?
   Write a spec-compliant JSON `ErrorResponse` body (with `application/json` 
content type and the correct status code) instead of calling `sendError`. 
Ensure the change is scoped so it does not regress non-Iceberg endpoints 
sharing this filter, and add tests asserting the JSON body and content type for 
401 and 403.
   
   Related: spec-compliance epic #10547.


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