lasdf1234 commented on PR #13687:
URL: https://github.com/apache/gravitino/pull/13687#issuecomment-6053869901

   > When do we throw `WebApplicationException`?
   
   We don't throw `WebApplicationException` in our Iceberg REST resource code.
   
   Jersey/JAX-RS raises it before the resource method runs for framework-level 
HTTP failures, for example:
   - `NotAcceptableException` (406) when `Accept` cannot be satisfied (the case 
in #13686)
   - `NotAllowedException` (405) when the HTTP method does not match the route 
(e.g. DELETE with an empty namespace path in our tests)
   - `NotSupportedException` (415) for unsupported `Content-Type`
   
   `IcebergExceptionMapper` is registered for `Throwable`, so it used to catch 
these and default them to 500. This PR preserves the status already carried by 
`WebApplicationException` instead.


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