Skip to content

Commit 6f18abc

Browse files
committed
fix invalid APIErrorNotFound usage
1 parent d8e123a commit 6f18abc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

routers/api/v1/misc/signing.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
package misc
55

66
import (
7-
"errors"
8-
97
"code.gitea.io/gitea/modules/git"
108
asymkey_service "code.gitea.io/gitea/services/asymkey"
119
"code.gitea.io/gitea/services/context"
@@ -109,7 +107,7 @@ func SigningKeySSH(ctx *context.APIContext) {
109107
return
110108
}
111109
if format != git.KeyTypeSSH {
112-
ctx.APIErrorNotFound(errors.New("GPG keys are used for signing, not SSH"))
110+
ctx.APIErrorNotFound("GPG keys are used for signing, not SSH")
113111
return
114112
}
115113
_, _ = ctx.Write([]byte(content))

0 commit comments

Comments
 (0)