liubao68 commented on a change in pull request #2154:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2154#discussion_r547103818



##########
File path: 
transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/RestClientInvocation.java
##########
@@ -116,12 +118,17 @@ public void invoke(Invocation invocation, AsyncResponse 
asyncResp) throws Except
         filter.beforeSendRequest(invocation, requestEx);
       }
     }
+    List<HttpRestClientInvocationHook> httpRestClientInvocationHooks =
+            SPIServiceUtils.getAllService(HttpRestClientInvocationHook.class);
 
     clientRequest.exceptionHandler(e -> {
       invocation.getTraceIdLogger()
           .error(LOGGER, "Failed to send request, alreadyFailed:{}, local:{}, 
remote:{}, message={}.",
               alreadyFailed, getLocalAddress(), ipPort.getSocketAddress(),
               ExceptionUtils.getExceptionMessageWithoutTrace(e));
+      httpRestClientInvocationHooks.forEach(httpServerExceptionHandler -> {

Review comment:
       Maybe you can add a custom handler to fillful your requirements. 
   
   e.g. 'MyHandler implements Handler'
   
   servicecomb.handler.chain.Consumer.defaut:  your_current_handlers,myhandler
   
   myhandler can process the exception thrown in RestClientInvocation




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to