You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/05/15 05:19:09 UTC

[GitHub] yhs0092 commented on a change in pull request #702: [SCB-580] fix response of the upload file too large

yhs0092 commented on a change in pull request #702: [SCB-580] fix response of the upload file too large
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/702#discussion_r188167573
 
 

 ##########
 File path: transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/VertxRestDispatcher.java
 ##########
 @@ -64,9 +69,71 @@ private void failureHandler(RoutingContext context) {
         e = cause;
       }
     }
-    restProducerInvocation.sendFailResponse(e);
 
-    // 走到这里,应该都是不可控制的异常,直接关闭连接
+    // only when unexpected exception happens, it will run into here.
+    // the connection should be closed.
+    handleFailureAndClose(context, restProducerInvocation, e);
+  }
+
+  /**
+   * Try to find out the failure information and send it in response.
+   */
+  private void handleFailureAndClose(RoutingContext context, AbstractRestInvocation restProducerInvocation,
+      Throwable e) {
+    if (null != restProducerInvocation) {
 
 Review comment:
   These two problems have been fixed. Please review again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services