LuciferYang opened a new pull request, #13402: URL: https://github.com/apache/gravitino/pull/13402
### What changes were proposed in this pull request? `OperationsProxy.invoke` now rethrows the target exception from the `InvocationTargetException` that reflection produces, matching the standard proxy-handler idiom already used in `DynMethods`. Callers see the operation's own exception, the same one a direct call would throw. ### Why are the changes needed? When a catalog supplies a `ProxyPlugin`, the reflective wrapper escaped instead of the real exception, so exception-type dispatch such as the REST layer's status mapping matched none of its `instanceof` branches and returned a generic 500 rather than the correct 404 or 409. Fix: #13401 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added `TestOperationsProxy.testExceptionsAreUnwrapped` (a typed exception thrown through a proxied operation reaches the caller unwrapped) and `testNormalInvocationPassesThrough` (a normal call is unaffected). The unwrap assertion fails against the pre-fix code. -- 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]
