EarthChen opened a new issue #8363:
URL: https://github.com/apache/dubbo/issues/8363
### Environment
* Dubbo version: 3.0.1
* Operating System version: macos
* Java version: 8
### Steps to reproduce this issue
i use custom exceptionFilter for return bizException ,
```java
public class DubboExceptionFilter implements Filter, Filter.Listener {
private static Logger log =
LoggerFactory.getLogger(DubboExceptionFilter.class);
@Override
public Result invoke(Invoker<?> invoker, Invocation invocation) throws
RpcException {
return invoker.invoke(invocation);
}
@Override
public void onResponse(Result appResponse, Invoker<?> invoker,
Invocation invocation) {
// ...
// my customer exception
if (className.startsWith("com.test.excepiton")) {
return;
}
// directly throw if it's dubbo exception
if (exception instanceof RpcException) {
return;
}
// otherwise, wrap with RuntimeException and throw back to
the client
appResponse.setException(new
RuntimeException(StringUtils.toString(exception)));
} catch (Throwable e) {
log.warn("Fail to ExceptionFilter when called by " +
RpcContext.getServiceContext().getRemoteHost() + ". service: " +
invoker.getInterface().getName() + ", method: " + invocation.getMethodName() +
", exception: " + e.getClass().getName() + ": " + e.getMessage(), e);
}
}
}
}
```
2. The provider provides an interface
```java
@Override
public SetMealCreateResponse
createSetMealByUserIdAndTeamId(SetMealCreateRequest setMealCreateRequest) {
throw new BizRpcException(1111, "test");
}
```
## use dubbo protocol

## use tri protocol

Pls. provide [GitHub address] to reproduce this issue.
### Expected Result
use tri protocol should return real exception
### Actual Result
return rpcException
--
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]