mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Improve "not found" error messages for API (#34267)
Make the message clear, for example: #34266
This commit is contained in:
@@ -5,7 +5,6 @@ package repo
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -367,7 +366,7 @@ func DeleteTime(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
if time.Deleted {
|
||||
ctx.APIErrorNotFound(fmt.Errorf("tracked time [%d] already deleted", time.ID))
|
||||
ctx.APIErrorNotFound("tracked time was already deleted")
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user