You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xuziyang (via GitHub)" <gi...@apache.org> on 2023/05/12 00:44:52 UTC

[GitHub] [dubbo] xuziyang commented on a diff in pull request #12280: Fix When serialization fails, the code value in org.apache.dubbo.rpc.RpcException is set incorrectly. (#12279)

xuziyang commented on code in PR #12280:
URL: https://github.com/apache/dubbo/pull/12280#discussion_r1191804270


##########
dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/DefaultFuture.java:
##########
@@ -203,7 +204,9 @@ private void doReceived(Response res) {
             this.complete(res.getResult());
         } else if (res.getStatus() == Response.CLIENT_TIMEOUT || res.getStatus() == Response.SERVER_TIMEOUT) {
             this.completeExceptionally(new TimeoutException(res.getStatus() == Response.SERVER_TIMEOUT, channel, res.getErrorMessage()));
-        } else {
+        } else if(res.getStatus() == Response.SERIALIZATION_ERROR){
+            this.completeExceptionally(new SerializationException(channel, res.getErrorMessage()));

Review Comment:
   As shown in the figure below, in the invoke method of AsyncToSyncInvoker, other exceptions are uniformly converted to RpcException. If you directly create a new RpcException(SERIALIZATION_EXCEPTION, res.getErrorMessage()) and throw it at the place you mentioned, would it conflict with the existing code logic?
   
   Also, why did building and testing fail without any error messages?
   
   ![image](https://github.com/apache/dubbo/assets/8465969/ebf9a3c9-0c33-4007-92f8-f94e3d9d25cf)
   



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org