Skip to content

Commit 801b6b8

Browse files
committed
fix: Add error handling for ignored errs
1 parent 42c9390 commit 801b6b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

services/httpd/handler.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,16 @@ func (h *Handler) serveExpvar(w http.ResponseWriter, r *http.Request) {
23972397
for _, s := range stats {
23982398
if s.Name == "cq" {
23992399
jv, err := parseCQStatistics(&s.Statistic)
2400+
if err != nil {
2401+
h.httpError(w, err.Error(), http.StatusInternalServerError)
2402+
return
2403+
}
24002404
data, err := json.Marshal(jv)
2405+
if err != nil {
2406+
h.httpError(w, err.Error(), http.StatusInternalServerError)
2407+
return
2408+
}
2409+
24012410
if !first {
24022411
_, err := fmt.Fprintln(w, ",")
24032412
if err != nil {

0 commit comments

Comments
 (0)