Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix(nil-pointer): wrong error passed | 2262 (#7463)

aniketio-ctrl459712d25caa
diff --git a/pkg/query-service/app/summary.go b/pkg/query-service/app/summary.go
index 2a13bdee7c..52ae58b679 100644
--- a/pkg/query-service/app/summary.go
+++ b/pkg/query-service/app/summary.go
@@ -67,17 +67,17 @@ func (aH *APIHandler) ListMetrics(w http.ResponseWriter, r *http.Request) {
bodyBytes, _ := io.ReadAll(r.Body)
r.Body = io.NopCloser(bytes.NewBuffer(bodyBytes))
ctx := r.Context()
- params, apiError := explorer.ParseSummaryListMetricsParams(r)
- if apiError != nil {
- zap.L().Error("error parsing metric list metric summary api request", zap.Error(apiError.Err))
- RespondError(w, model.BadRequest(apiError), nil)
+ params, apiErr := explorer.ParseSummaryListMetricsParams(r)
+ if apiErr != nil {
+ zap.L().Error("error parsing metric list metric summary api request", zap.Error(apiErr.Err))
+ RespondError(w, model.BadRequest(apiErr), nil)
return
}
slmr, apiErr := aH.SummaryService.ListMetricsWithSummary(ctx, params)
if apiErr != nil {
- zap.L().Error("error parsing metric query range params", zap.Error(apiErr.Err))
- RespondError(w, apiError, nil)
+ zap.L().Error("error in getting list metrics summary", zap.Error(apiErr.Err))
+ RespondError(w, apiErr, nil)
return
}
aH.Respond(w, slmr)