Skip to content

Commit d37a89e

Browse files
lunnyzeripathtechknowlogick
authored
don't record error when request a non-exist user (#15819)
* don't record error when request a non-exist user * Update routers/repo/http.go Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 parent 75d8297 commit d37a89e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/repo/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func httpBase(ctx *context.Context) (h *serviceHandler) {
117117
if redirectUserID, err := models.LookupUserRedirect(username); err == nil {
118118
context.RedirectToUser(ctx, username, redirectUserID)
119119
} else {
120-
ctx.NotFound("GetUserByName", err)
120+
ctx.NotFound(fmt.Sprintf("User %s does not exist", username), nil)
121121
}
122122
} else {
123123
ctx.ServerError("GetUserByName", err)

0 commit comments

Comments
 (0)