jerryshao commented on PR #14612: URL: https://github.com/apache/gravitino/pull/14612#issuecomment-6627893263
@roryqi Updated in 787833ad00. I moved the repeated `IllegalArgumentException` handling into a shared `RequestValidation` helper. The interceptor still handles the HTTP error response centrally, while call sites retain their existing error types and messages. The helper wraps only explicit client-input parsing and validation: metadata object names, requested privileges, request DTO validation, and lineage input preparation. Authorizer configuration, expression evaluation, and authorization calls remain outside that scope. Catching every `IllegalArgumentException` at the outermost layer would incorrectly turn internal configuration or authorizer failures into HTTP 400. I also added a regression test that sends a valid request and makes the authorizer throw `IllegalArgumentException`; it still returns HTTP 500. The existing configuration-error test remains in place. All 140 targeted tests pass. The shared changes are also synchronized to the branch-1.3 PR #14613, including its tag/policy validation paths; all 104 targeted tests pass there. -- 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]
