[ 
https://issues.apache.org/jira/browse/SCB-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583240#comment-16583240
 ] 

ASF GitHub Bot commented on SCB-847:
------------------------------------

wujimin commented on a change in pull request #874: [SCB-847]Provide a way to 
decode user's custom error data
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/874#discussion_r210783022
 
 

 ##########
 File path: 
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestObjectMapperFactory.java
 ##########
 @@ -17,17 +17,40 @@
 
 package org.apache.servicecomb.common.rest.codec;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * Manage RestObjectMapper instances. Give users an option to specify custom 
mappers.
  */
 public class RestObjectMapperFactory {
+  public static final String KEY_PROVIDER_READ_OR_CONSUMER_READ = 
"provider.consumer.read";
+
+  public static final String KEY_PROVIDER_WRITE = "provider.write";
+
+  public static final String KEY_CONSUMER_WRITE = "consumer.write";
+
   private static AbstractRestObjectMapper defaultMapper = new 
RestObjectMapper();
 
+  private static Map<String, AbstractRestObjectMapper> allMappers = new 
HashMap<>();
 
 Review comment:
   no need to wrap as a map, just two method is enough:
   1.getDefaultMapper
   2.getConsumerWriteMapper

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


> Provide a way to decode user's custom error data
> ------------------------------------------------
>
>                 Key: SCB-847
>                 URL: https://issues.apache.org/jira/browse/SCB-847
>             Project: Apache ServiceComb
>          Issue Type: New Feature
>          Components: Java-Chassis
>            Reporter: liubao
>            Assignee: liubao
>            Priority: Major
>
> Now ServiceComb can only decode two types of response:
>  # specified in service
>  # CommonExceptionData
> Users may need to return custom response error data. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to