JusFree opened a new issue, #14426:
URL: https://github.com/apache/dubbo/issues/14426

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   3.2.13
   
   ### Steps to reproduce this issue
   
   Declared a custom interceptor using SPI as follows:
   ```
   @Activate(group = {CommonConstants.PROVIDER})
   public class DubboExceptionFilter implements Filter {
       @Override
       public Result invoke(Invoker<?> invoker, Invocation invocation) throws 
RpcException {
           try {
               Result result = invoker.invoke(invocation);
               if (result.hasException()) {
                   Throwable exception = result.getException();
                   if (exception instanceof BaseException) {
                       BaseException customException = (BaseException) 
exception;
                       return AsyncRpcResult.newDefaultAsyncResult(new 
BaseException(customException.getMessage(), customException.getCode()), 
invocation);
                   }
               }
               return result;
           } catch (RpcException e) {
               throw e;
           }
       }
   }
   ```
   However, the exception returned by the caller is still wrapped in a 
RuntimeException.
   
   ### What you expected to happen
   
   Able to correctly retrieve the custom exception.
   
   
   
   
   
   
   
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to