pull/197/head
Unknown 11 years ago
parent 422043f422
commit fbf274b751
  1. 12
      routers/repo/http.go

@ -47,13 +47,21 @@ func Http(ctx *middleware.Context, params martini.Params) {
repoUser, err := models.GetUserByName(username) repoUser, err := models.GetUserByName(username)
if err != nil { if err != nil {
ctx.Handle(500, "repo.GetUserByName", nil) if err == models.ErrUserNotExist {
ctx.Handle(404, "repo.Http(GetUserByName)", nil)
} else {
ctx.Handle(500, "repo.Http(GetUserByName)", nil)
}
return return
} }
repo, err := models.GetRepositoryByName(repoUser.Id, reponame) repo, err := models.GetRepositoryByName(repoUser.Id, reponame)
if err != nil { if err != nil {
ctx.Handle(500, "repo.GetRepositoryByName", nil) if err == models.ErrRepoNotExist {
ctx.Handle(404, "repo.Http(GetRepositoryByName)", nil)
} else {
ctx.Handle(500, "repo.Http(GetRepositoryByName)", nil)
}
return return
} }

Loading…
Cancel
Save