fix: api error message (#38031)

Fix various abuses and mistakes
This commit is contained in:
wxiaoguang
2026-06-08 16:58:42 +08:00
committed by GitHub
parent 60f66a9bfd
commit 136f7d18aa
27 changed files with 80 additions and 256 deletions
+1 -5
View File
@@ -68,11 +68,7 @@ func getNote(ctx *context.APIContext, identifier string) {
commitID, err := ctx.Repo.GitRepo.ConvertToGitID(identifier)
if err != nil {
if git.IsErrNotExist(err) {
ctx.APIErrorNotFound(err)
} else {
ctx.APIErrorInternal(err)
}
ctx.APIErrorAuto(err)
return
}