diff --git a/dubbo-filter/dubbo-filter-validation/src/main/java/com/alibaba/dubbo/validation/filter/ValidationFilter.java b/dubbo-filter/dubbo-filter-validation/src/main/java/com/alibaba/dubbo/validation/filter/ValidationFilter.java index 655aad878f9..d26d01888db 100644 --- a/dubbo-filter/dubbo-filter-validation/src/main/java/com/alibaba/dubbo/validation/filter/ValidationFilter.java +++ b/dubbo-filter/dubbo-filter-validation/src/main/java/com/alibaba/dubbo/validation/filter/ValidationFilter.java @@ -24,6 +24,7 @@ import com.alibaba.dubbo.rpc.Invoker; import com.alibaba.dubbo.rpc.Result; import com.alibaba.dubbo.rpc.RpcException; +import com.alibaba.dubbo.rpc.RpcResult; import com.alibaba.dubbo.validation.Validation; import com.alibaba.dubbo.validation.Validator; @@ -50,7 +51,7 @@ public Result invoke(Invoker invoker, Invocation invocation) throws RpcExcept } catch (RpcException e) { throw e; } catch (Throwable t) { - throw new RpcException(t.getMessage(), t); + return new RpcResult(t); } } return invoker.invoke(invocation);