chenyulin0719 commented on code in PR #916:
URL: https://github.com/apache/yunikorn-core/pull/916#discussion_r1678105609


##########
pkg/webservice/handlers.go:
##########
@@ -1100,6 +1101,10 @@ func getUserResourceUsage(w http.ResponseWriter, r 
*http.Request) {
                buildJSONErrorResponse(w, err.Error(), http.StatusBadRequest)
                return
        }
+       if !configs.UserRegExp.MatchString(unescapedUser) {
+               buildJSONErrorResponse(w, InvalidUserName, http.StatusNotFound)

Review Comment:
   IMO, if we call the User REST with an invalid username, the return code 
should be "400 Bad Request".   
   
   @manirajv06 WDYT?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to