Skip to content

Commit 6f2b6f3

Browse files
committed
Minor syntax changes
1 parent 96fae7a commit 6f2b6f3

File tree

1 file changed

+3
-3
lines changed
  • services/question-service/handlers

1 file changed

+3
-3
lines changed

services/question-service/handlers/list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (s *Service) ListQuestions(w http.ResponseWriter, r *http.Request) {
108108
totalIter, err := query.Documents(ctx).GetAll()
109109
totalCount := len(totalIter)
110110
if err != nil {
111-
http.Error(w, "Failed to count questions: "+err.Error(), http.StatusInternalServerError)
111+
http.Error(w, "Failed to count questions", http.StatusInternalServerError)
112112
return
113113
}
114114

@@ -148,14 +148,14 @@ func (s *Service) ListQuestions(w http.ResponseWriter, r *http.Request) {
148148
break
149149
}
150150
if err != nil {
151-
http.Error(w, "Failed to retrieve questions: ", http.StatusInternalServerError)
151+
http.Error(w, "Failed to retrieve questions", http.StatusInternalServerError)
152152
return
153153
}
154154

155155
// Map data
156156
var question models.Question
157157
if err := doc.DataTo(&question); err != nil {
158-
http.Error(w, "Failed to parse question: ", http.StatusInternalServerError)
158+
http.Error(w, "Failed to parse question", http.StatusInternalServerError)
159159
return
160160
}
161161
question.DocRefID = doc.Ref.ID

0 commit comments

Comments
 (0)