mirror of
https://github.com/go-gitea/gitea
synced 2025-08-23 18:08:28 +00:00
Use ServerError provided by Context (#14333)
... instead of InternalServerError by macaron
This commit is contained in:
@@ -1117,7 +1117,7 @@ func ViewIssue(ctx *context.Context) {
|
||||
iw.IssueID = issue.ID
|
||||
iw.IsWatching, err = models.CheckIssueWatch(ctx.User, issue)
|
||||
if err != nil {
|
||||
ctx.InternalServerError(err)
|
||||
ctx.ServerError("CheckIssueWatch", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@@ -355,7 +355,7 @@ func DeleteProjectBoard(ctx *context.Context) {
|
||||
|
||||
pb, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID"))
|
||||
if err != nil {
|
||||
ctx.InternalServerError(err)
|
||||
ctx.ServerError("GetProjectBoard", err)
|
||||
return
|
||||
}
|
||||
if pb.ProjectID != ctx.ParamsInt64(":id") {
|
||||
@@ -445,7 +445,7 @@ func EditProjectBoardTitle(ctx *context.Context, form auth.EditProjectBoardTitle
|
||||
|
||||
board, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID"))
|
||||
if err != nil {
|
||||
ctx.InternalServerError(err)
|
||||
ctx.ServerError("GetProjectBoard", err)
|
||||
return
|
||||
}
|
||||
if board.ProjectID != ctx.ParamsInt64(":id") {
|
||||
|
@@ -713,11 +713,11 @@ func UpdatePullRequest(ctx *context.Context) {
|
||||
}
|
||||
|
||||
if err := issue.PullRequest.LoadBaseRepo(); err != nil {
|
||||
ctx.InternalServerError(err)
|
||||
ctx.ServerError("LoadBaseRepo", err)
|
||||
return
|
||||
}
|
||||
if err := issue.PullRequest.LoadHeadRepo(); err != nil {
|
||||
ctx.InternalServerError(err)
|
||||
ctx.ServerError("LoadHeadRepo", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user