diff options
Diffstat (limited to 'routers/api/v1/repo/release.go')
-rw-r--r-- | routers/api/v1/repo/release.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go index 752b5c76e0..e7cc1e8671 100644 --- a/routers/api/v1/repo/release.go +++ b/routers/api/v1/repo/release.go @@ -151,7 +151,7 @@ func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) { rel, err := models.GetRelease(ctx.Repo.Repository.ID, form.TagName) if err != nil { if !models.IsErrReleaseNotExist(err) { - ctx.ServerError("GetRelease", err) + ctx.Error(http.StatusInternalServerError, "GetRelease", err) return } // If target is not provided use default branch @@ -195,7 +195,7 @@ func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) { rel.Publisher = ctx.User if err = releaseservice.UpdateReleaseOrCreatReleaseFromTag(ctx.User, ctx.Repo.GitRepo, rel, nil, true); err != nil { - ctx.ServerError("UpdateReleaseOrCreatReleaseFromTag", err) + ctx.Error(http.StatusInternalServerError, "UpdateReleaseOrCreatReleaseFromTag", err) return } } |