Skip to content

Commit 64122b1

Browse files
committed
fix
1 parent 145b583 commit 64122b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/api/v1/repo/issue_label.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ func prepareForReplaceOrAdd(ctx *context.APIContext, form api.IssueLabelsOption)
351351
}
352352

353353
if !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) {
354-
ctx.Status(http.StatusForbidden)
355-
return nil, nil, nil
354+
ctx.Error(http.StatusForbidden, "CanWriteIssuesOrPulls", "you should have write access to issue")
355+
return nil, nil, fmt.Errorf("permission denied")
356356
}
357357

358358
return issue, labels, err

0 commit comments

Comments
 (0)