[
https://issues.apache.org/jira/browse/SCB-827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16575874#comment-16575874
]
ASF GitHub Bot commented on SCB-827:
------------------------------------
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:
[email protected]
> Add response decode error log
> -----------------------------
>
> Key: SCB-827
> URL: https://issues.apache.org/jira/browse/SCB-827
> Project: Apache ServiceComb
> Issue Type: Improvement
> Reporter: YaoHaishi
> Assignee: YaoHaishi
> Priority: Major
>
> In DefaultHttpClientFilter.extractResult(), once response decode error
> occurs, it will be caught and set into an InvocationException, and the
> InvocationException will be treated as response body, which will cause
> confusing result.
> We need to print some logs to help developers locate such problem.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)