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



##########
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:
       
https://docs.servicecomb.io/java-chassis/zh_CN/references-handlers/intruduction/
   
   I found it didn't meet my requirements through experiments.
   
    My handler executes before the exception is returned, and does not return 
to handler after the exception is thrown.
   
   I can't get this exception message.
   
   Is there any other way




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