We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11d3677 commit 5d3dbffCopy full SHA for 5d3dbff
routers/web/user/avatar.go
@@ -31,6 +31,10 @@ func AvatarByUserName(ctx *context.Context) {
31
if strings.ToLower(userName) != "ghost" {
32
var err error
33
if user, err = user_model.GetUserByName(ctx, userName); err != nil {
34
+ if user_model.IsErrUserNotExist(err) {
35
+ ctx.NotFound("GetUserByName", err)
36
+ return
37
+ }
38
ctx.ServerError("Invalid user: "+userName, err)
39
return
40
}
0 commit comments