Technoboy- commented on a change in pull request #2397: api server exception 
management and code optimization (#397)
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/2397#discussion_r407062782
 
 

 ##########
 File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/AccessTokenService.java
 ##########
 @@ -83,6 +84,9 @@
     public Map<String, Object> createToken(int userId, String expireTime, 
String token) {
         Map<String, Object> result = new HashMap<>(5);
 
+        if (userId <= 0) {
+            throw new ApiServerException("User id should not less than or 
equals to 0.");
 
 Review comment:
   Using IllegalArgumentException

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