yhs0092 commented on a change in pull request #865: [SCB-827] Add response body 
decoding error log
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/865#discussion_r209167388
 
 

 ##########
 File path: 
transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/DefaultHttpClientFilter.java
 ##########
 @@ -79,13 +82,15 @@ protected Object extractResult(Invocation invocation, 
HttpServletResponseEx resp
               responseEx.getStatus(),
               responseEx.getStatusType().getReasonPhrase(),
               responseEx.getHeader(HttpHeaders.CONTENT_TYPE));
+      LOGGER.error(msg);
       return ExceptionFactory.createConsumerException(new 
InvocationException(responseEx.getStatus(), 
responseEx.getStatusType().getReasonPhrase(), msg));
     }
 
     try {
       return produceProcessor.decodeResponse(responseEx.getBodyBuffer(), 
responseMeta.getJavaType());
     } catch (Exception e) {
-      return ExceptionFactory.createConsumerException(e);
+      LOGGER.error("failed to decode response body", e);
+      throw ExceptionFactory.createConsumerException(e);
 
 Review comment:
   OK, 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to