Skip to content

Commit

Permalink
Invoke async should throw raw exception instead of CompletionException
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoyf committed Jan 10, 2025
1 parent e0db654 commit 5cd3f05
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.apache.rocketmq.common.ServiceThread;
import org.apache.rocketmq.common.UtilAll;
import org.apache.rocketmq.common.constant.LoggerName;
import org.apache.rocketmq.common.utils.ExceptionUtils;
import org.apache.rocketmq.logging.org.slf4j.Logger;
import org.apache.rocketmq.logging.org.slf4j.LoggerFactory;
import org.apache.rocketmq.remoting.ChannelEventListener;
Expand Down Expand Up @@ -602,7 +603,7 @@ public void invokeAsyncImpl(final Channel channel, final RemotingCommand request
})
.thenAccept(responseFuture -> invokeCallback.operationSucceed(responseFuture.getResponseCommand()))
.exceptionally(t -> {
invokeCallback.operationFail(t);
invokeCallback.operationFail(ExceptionUtils.getRealException(t));
return null;
});
}
Expand Down

0 comments on commit 5cd3f05

Please sign in to comment.