```java
 public Result thenApplyWithContext(Function<Result, Result> fn) {
        this.thenApply(fn.compose(beforeContext).andThen(afterContext));
        // You may need to return a new Result instance representing the next async stage,
        // like thenApply will return a new CompletableFuture.
        return this;
    }
```

to

```java
```java
 public Result thenApplyWithContext(BiFunction<Throwable, Result> fn) {
        this.handle(fn);
        // You may need to return a new Result instance representing the next async stage,
        // like thenApply will return a new CompletableFuture.
        return this;
    }
```
```
public interface Result extends org.apache.dubbo.rpc.Result {
    @Override
    default void setValue(Object value) {
    }
    @Override
    default void setException(Throwable t) {
    }
    abstract class AbstractResult extends org.apache.dubbo.rpc.AbstractResult implements Result {
        @Override
        public org.apache.dubbo.rpc.Result thenApplyWithContext(Function<org.apache.dubbo.rpc.Result, org.apache.dubbo.rpc.Result> fn) {
            return null;
        }
    }
    class CompatibleResult extends AbstractResult {