mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:31:46 +08:00
Improve user error handling.
This commit is contained in:
@ -228,7 +228,7 @@ func (c *ApiController) SetPassword() {
|
||||
userId := fmt.Sprintf("%s/%s", userOwner, userName)
|
||||
targetUser := object.GetUser(userId)
|
||||
if targetUser == nil {
|
||||
c.ResponseError("Invalid user id.")
|
||||
c.ResponseError(fmt.Sprintf("The user: %s doesn't exist", userId))
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user