You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/10/18 09:40:26 UTC

[GitHub] majinkai commented on a change in pull request #146: Add exception uniform catch and response status specification

majinkai commented on a change in pull request #146: Add exception uniform catch and response status specification
URL: https://github.com/apache/incubator-dubbo-ops/pull/146#discussion_r226237440
 
 

 ##########
 File path: dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/controller/AccessesController.java
 ##########
 @@ -95,6 +96,7 @@ public void deleteAccess(@PathVariable String id, @PathVariable String env) {
     }
 
     @RequestMapping(method = RequestMethod.POST)
+    @ResponseStatus(HttpStatus.CREATED)
     public void createAccess(@RequestBody AccessDTO accessDTO, @PathVariable String env) {
         if (StringUtils.isBlank(accessDTO.getService())) {
             throw new IllegalArgumentException("Service is required.");
 
 Review comment:
   Can you replace the IllegalArgumentException with the corresponding exceptions.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org