File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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) {
14491449 switch ctx .Params (":action" ) {
14501450 case "react" :
14511451 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 )
14531454 return
14541455 }
14551456
@@ -1549,7 +1550,8 @@ func ChangeCommentReaction(ctx *context.Context, form auth.ReactionForm) {
15491550 switch ctx .Params (":action" ) {
15501551 case "react" :
15511552 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 )
15531555 return
15541556 }
15551557
You can’t perform that action at this time.
0 commit comments