You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/08/10 03:30:55 UTC

[GitHub] wujimin commented on a change in pull request #865: [SCB-827] Add response body decoding error log

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

 ##########
 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:
   change "extractResult" to "extractResponse"?

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