diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-04-23 17:42:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-23 17:42:50 +0800 |
commit | 8aee07a0641d345ada5622cb7d345badca503929 (patch) | |
tree | e6d832845029bd459fffa93d645b6aa0d98426d0 /routers/api/v1/repo/notes.go | |
parent | c2c04ffff7ea32d3dedc830ad26995813916a940 (diff) | |
download | gitea-8aee07a0641d345ada5622cb7d345badca503929.tar.gz gitea-8aee07a0641d345ada5622cb7d345badca503929.zip |
Improve "not found" error messages for API (#34267)
Make the message clear, for example: #34266
Diffstat (limited to 'routers/api/v1/repo/notes.go')
-rw-r--r-- | routers/api/v1/repo/notes.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/notes.go b/routers/api/v1/repo/notes.go index eb048df6fe..87efb1caf2 100644 --- a/routers/api/v1/repo/notes.go +++ b/routers/api/v1/repo/notes.go @@ -79,7 +79,7 @@ func getNote(ctx *context.APIContext, identifier string) { var note git.Note if err := git.GetNote(ctx, ctx.Repo.GitRepo, commitID.String(), ¬e); err != nil { if git.IsErrNotExist(err) { - ctx.APIErrorNotFound(identifier) + ctx.APIErrorNotFound("commit doesn't exist: " + identifier) return } ctx.APIErrorInternal(err) |