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

   <!-- If you need to report a security issue please visit 
https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) 
of this repository and believe that this is not a duplicate.
   
   ### Steps to reproduce this issue
   
   1. Define a provider filter which will always throw RpcException
   ```java
   @Activate(group = "provider")
   public class ProviderFilter implements Filter {
       @Override
       public Result invoke(Invoker<?> invoker, Invocation invocation) throws 
RpcException {
           if (invocation.getMethodName().contains("sayHiWithException")) {
               throw new RpcException(FORBIDDEN_EXCEPTION, "provider filter 
exception");
           } else {
               return invoker.invoke(invocation);
           }
       }
   }
   ```
   
   2. Define a consumer Filter to get `path` from `invoker`
   ```java
   @Activate(group = "consumer")
   public class ConsumerFilter implements Filter, BaseFilter.Listener {
       @Override
       public Result invoke(Invoker<?> invoker, Invocation invocation) throws 
RpcException {
           return invoker.invoke(invocation);
       }
   
       @Override
       public void onResponse(Result appResponse, Invoker<?> invoker, 
Invocation invocation) {
           if (invoker.getUrl().getPath() == null) {
               throw new IllegalArgumentException("invoker.getUrl().getPath() 
is null");
           }
       }
   
       @Override
       public void onError(Throwable t, Invoker<?> invoker, Invocation 
invocation) {
           if (invoker.getUrl().getPath() == null) {
               throw new IllegalArgumentException("invoker.getUrl().getPath() 
is null");
           }
       }
   }
   ```
   
   ### Expected Behavior
   
   <!-- What do you expect from the above steps?-->
   `invoker.getUrl().getPath()` returns real path.
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   `invoker.getUrl().getPath()` returns null in `onResponse` and `onError`.
   


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