Skip to content

Commit 5e5096e

Browse files
fix: return partial results for multiple targets (#331)
1 parent 2f6e229 commit 5e5096e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

cmd/sql_exporter/promhttp.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ func ExporterHandlerFor(exporter sql_exporter.Exporter) http.Handler {
3838
if err != nil {
3939
if errors.Is(err, context.DeadlineExceeded) {
4040
klog.Errorf("Timeout collecting metrics from target: %s", err)
41-
http.Error(w, "Timeout collecting metrics from target, "+err.Error(), http.StatusInternalServerError)
42-
return
4341
}
4442
if len(mfs) == 0 {
4543
klog.Errorf("No metrics gathered: %s", err)
4644
http.Error(w, "No metrics gathered, "+err.Error(), http.StatusInternalServerError)
4745
return
4846
}
4947
klog.Errorf("Error gathering metrics: %s", err)
50-
http.Error(w, "Error gathering metrics, "+err.Error(), http.StatusInternalServerError)
51-
return
5248
}
5349

5450
contentType := expfmt.Negotiate(req.Header)

0 commit comments

Comments
 (0)