You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2020/06/16 09:03:56 UTC

[servicecomb-java-chassis] 03/06: [SCB-2000]need catch exception and on failure not processing it

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git

commit 86325a3a3d1bd931184768bedbd435b83ef30d7c
Author: liubao <bi...@qq.com>
AuthorDate: Sat Jun 13 16:13:07 2020 +0800

    [SCB-2000]need catch exception and on failure not processing it
---
 .../java/org/apache/servicecomb/edge/core/EdgeInvocation.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/edge/edge-core/src/main/java/org/apache/servicecomb/edge/core/EdgeInvocation.java b/edge/edge-core/src/main/java/org/apache/servicecomb/edge/core/EdgeInvocation.java
index 962c72e..445522f 100644
--- a/edge/edge-core/src/main/java/org/apache/servicecomb/edge/core/EdgeInvocation.java
+++ b/edge/edge-core/src/main/java/org/apache/servicecomb/edge/core/EdgeInvocation.java
@@ -68,9 +68,13 @@ public class EdgeInvocation extends AbstractRestInvocation {
             if (e != null) {
               sendFailResponse(e);
             } else {
-              microserviceReferenceConfig = r;
-              findRestOperation(microserviceReferenceConfig.getLatestMicroserviceMeta());
-              scheduleInvocation();
+              try {
+                microserviceReferenceConfig = r;
+                findRestOperation(microserviceReferenceConfig.getLatestMicroserviceMeta());
+                scheduleInvocation();
+              } catch (Throwable error) {
+                sendFailResponse(error);
+              }
             }
           });
         }