refactor: remove NotFoundOrServerError (#39727)

follow up #39722
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-10-10 16:34:53 +02:00
1 parent c30ddc3e14
commit e60d1c7fc8
13 files changed
+29 -41

No files matched your search

+3 -3
View File
@@ -26,7 +26,7 @@ func findProject(ctx *context.Context) *project_model.Project {
project, err = project_model.GetProjectByIDAndOwner(ctx, ctx.PathParamInt64("id"), ctx.ContextUser.ID)
}
if err != nil {
ctx.NotFoundOrServerError("GetProject", project_model.IsErrProjectNotExist, err)
ctx.ServerError("GetProject", err)
return nil
}
return project
@@ -39,7 +39,7 @@ func findColumn(ctx *context.Context) (*project_model.Project, *project_model.Co
}
column, err := project_model.GetColumnByIDAndProjectID(ctx, ctx.PathParamInt64("columnID"), project.ID)
if err != nil {
ctx.NotFoundOrServerError("GetColumnByIDAndProjectID", project_model.IsErrProjectColumnNotExist, err)
ctx.ServerError("GetColumnByIDAndProjectID", err)
return nil, nil
}
return project, column
@@ -175,7 +175,7 @@ func MoveIssues(ctx *context.Context) {
}
movedIssues, err := issues_model.GetIssuesByIDs(ctx, issueIDs)
if err != nil {
ctx.NotFoundOrServerError("GetIssueByID", issues_model.IsErrIssueNotExist, err)
ctx.ServerError("GetIssueByID", err)
return
}