Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix RecommendTagEnter

aichy126dcf28bf20444
diff --git a/internal/service/question_service.go b/internal/service/question_service.go
index 0e9eb95c..75e143dd 100644
--- a/internal/service/question_service.go
+++ b/internal/service/question_service.go
@@ -258,8 +258,13 @@ func (qs *QuestionService) UpdateQuestion(ctx context.Context, req *schema.Quest
return
}
if !recommendExist {
- err = errors.BadRequest(reason.RecommendTagEnter).WithError(err).WithStack()
- return
+ errorlist := make([]*validator.FormErrorField, 0)
+ errorlist = append(errorlist, &validator.FormErrorField{
+ ErrorField: "tags",
+ ErrorMsg: reason.RecommendTagEnter,
+ })
+ err = errors.BadRequest(reason.RecommendTagEnter)
+ return errorlist, err
}
//CheckChangeTag