walker-dead-cave commented on issue #1288:  unknown rest exception.
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/1288#issuecomment-520321489
 
 
   json格式校验是在filter中校验的,handler捕获不了,
   
   我在 
HttpServerFilter中能做json校验,错误的json格式能正确自定义返回参数,但是会把正确的json合适当做错误的json格式,并且捕获不了
    public Response afterReceiveRequest(Invocation invocation, 
HttpServletRequestEx requestEx) {
           String clientSignature = requestEx.getHeader("signature");
   //        OperationLocator
           try {
               OperationMeta operationMeta = invocation.getOperationMeta();
               RestOperationMeta restOperationMeta = 
operationMeta.getExtData(RestConst.SWAGGER_REST_OPERATION);
               Object[] args = RestCodec.restToArgs(requestEx, 
restOperationMeta);
               invocation.setSwaggerArguments(args);

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to