This commit is contained in:
Unknown 2014-05-08 20:00:07 -04:00
parent 914ffa496f
commit 25713ab209
3 changed files with 14 additions and 8 deletions

View file

@ -53,7 +53,11 @@ func Profile(ctx *middleware.Context, params martini.Params) {
user, err := models.GetUserByName(params["username"])
if err != nil {
ctx.Handle(500, "user.Profile", err)
if err == models.ErrUserNotExist {
ctx.Handle(404, "user.Profile", err)
} else {
ctx.Handle(500, "user.Profile", err)
}
return
}