mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Improve "not found" error messages for API (#34267)
Make the message clear, for example: #34266
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user