File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1449,7 +1449,8 @@ func ChangeIssueReaction(ctx *context.Context, form auth.ReactionForm) {
1449
1449
switch ctx .Params (":action" ) {
1450
1450
case "react" :
1451
1451
if ! util .IsStringInSlice (form .Content , setting .UI .Reactions ) {
1452
- log .Error ("ChangeIssueReaction: '%s' is not an allowed reaction" , form .Content )
1452
+ err := fmt .Errorf ("ChangeIssueReaction: '%s' is not an allowed reaction" , form .Content )
1453
+ ctx .ServerError (err .Error (), err )
1453
1454
return
1454
1455
}
1455
1456
@@ -1549,7 +1550,8 @@ func ChangeCommentReaction(ctx *context.Context, form auth.ReactionForm) {
1549
1550
switch ctx .Params (":action" ) {
1550
1551
case "react" :
1551
1552
if ! util .IsStringInSlice (form .Content , setting .UI .Reactions ) {
1552
- log .Error ("ChangeIssueReaction: '%s' is not an allowed reaction" , form .Content )
1553
+ err := fmt .Errorf ("ChangeIssueReaction: '%s' is not an allowed reaction" , form .Content )
1554
+ ctx .ServerError (err .Error (), err )
1553
1555
return
1554
1556
}
1555
1557
You can’t perform that action at this time.
0 commit comments