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

2018-08-12 Thread GitBox
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_r209459205
 
 

 ##
 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:
   Get it.. Maybe we can  throw the `InvocationException` directly? After 
all, a none 2xx response will be transferred into an `Exception` in 
`Invoker.syncInvoke()` and `CseClientHttpRequest.invoke()`.


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


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

2018-08-10 Thread GitBox
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