Explorar el Código

When delete tracked time through the API return 404 not 500 (#11319) (#11326)

tags/v1.11.5
6543 hace 4 años
padre
commit
79868d7096
No account linked to committer's email address
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5
    1
      routers/api/v1/repo/issue_tracked_time.go

+ 5
- 1
routers/api/v1/repo/issue_tracked_time.go Ver fichero

@@ -289,7 +289,11 @@ func DeleteTime(ctx *context.APIContext) {

time, err := models.GetTrackedTimeByID(ctx.ParamsInt64(":id"))
if err != nil {
ctx.Error(500, "GetTrackedTimeByID", err)
if models.IsErrNotExist(err) {
ctx.NotFound(err)
return
}
ctx.Error(http.StatusInternalServerError, "GetTrackedTimeByID", err)
return
}


Cargando…
Cancelar
Guardar