Skip to content

Commit

Permalink
Add missing parameter for error in log message (#20144)
Browse files Browse the repository at this point in the history
- Adds a `%v` for the last parameter, `err`.

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
  • Loading branch information
Gusted and jolheiser authored Jun 27, 2022
1 parent 5371964 commit 9eb6c4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/private/hook_pre_receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func (ctx *preReceiveContext) loadPusherAndPermission() bool {

userPerm, err := access_model.GetUserRepoPermission(ctx, ctx.Repo.Repository, user)
if err != nil {
log.Error("Unable to get Repo permission of repo %s/%s of User %s", ctx.Repo.Repository.OwnerName, ctx.Repo.Repository.Name, user.Name, err)
log.Error("Unable to get Repo permission of repo %s/%s of User %s: %v", ctx.Repo.Repository.OwnerName, ctx.Repo.Repository.Name, user.Name, err)
ctx.JSON(http.StatusInternalServerError, private.Response{
Err: fmt.Sprintf("Unable to get Repo permission of repo %s/%s of User %s: %v", ctx.Repo.Repository.OwnerName, ctx.Repo.Repository.Name, user.Name, err),
})
Expand Down

0 comments on commit 9eb6c4a

Please sign in to comment.