aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/web/user/avatar.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/web/user/avatar.go b/routers/web/user/avatar.go
index 53a603fab0..05896299d2 100644
--- a/routers/web/user/avatar.go
+++ b/routers/web/user/avatar.go
@@ -31,6 +31,10 @@ func AvatarByUserName(ctx *context.Context) {
if strings.ToLower(userName) != "ghost" {
var err error
if user, err = user_model.GetUserByName(ctx, userName); err != nil {
+ if user_model.IsErrUserNotExist(err) {
+ ctx.NotFound("GetUserByName", err)
+ return
+ }
ctx.ServerError("Invalid user: "+userName, err)
return
}