fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

Handle JSON encoding errors in /list like in /search (#525)

Repeat the fix from #506.

author
Ian Kerins
committer
GitHub
date (Jan 30, 2023, 3:19 PM +0200) commit 989b9b1d parent f6d0aa00
+5 -2
+5 -2
json/json.go
··· 92 92 } 93 93 94 94 err = json.NewEncoder(w).Encode(jsonSearchReply{searchResult}) 95 - 96 95 if err != nil { 97 96 jsonError(w, http.StatusInternalServerError, err.Error()) 98 97 return ··· 168 167 return 169 168 } 170 169 171 - json.NewEncoder(w).Encode(jsonListReply{listResult}) 170 + err = json.NewEncoder(w).Encode(jsonListReply{listResult}) 171 + if err != nil { 172 + jsonError(w, http.StatusInternalServerError, err.Error()) 173 + return 174 + } 172 175 }