mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix error handling when requesting profile image for bad user ID (#8618)
This commit is contained in:
committed by
Christopher Speller
parent
ae5e324be8
commit
21b1cd44e0
@@ -199,7 +199,8 @@ func getProfileImage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
} else {
|
||||
if len(users) == 0 {
|
||||
c.Err = err
|
||||
c.Err = model.NewAppError("getProfileImage", "api.user.get_profile_image.not_found.app_error", nil, "", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
user := users[0]
|
||||
|
||||
Reference in New Issue
Block a user