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.

chore: fix error in http_handler for get ttl (#9652)

Nityananda Gohain12c9b921a777
diff --git a/pkg/query-service/app/http_handler.go b/pkg/query-service/app/http_handler.go
index bf22a5b648..18aca341c6 100644
--- a/pkg/query-service/app/http_handler.go
+++ b/pkg/query-service/app/http_handler.go
@@ -2000,9 +2000,8 @@ func (aH *APIHandler) getTTL(w http.ResponseWriter, r *http.Request) {
render.Error(w, err)
return
}
- result, err := aH.reader.GetTTL(r.Context(), claims.OrgID, ttlParams)
- if err != nil {
- render.Error(w, err)
+ result, apiErr := aH.reader.GetTTL(r.Context(), claims.OrgID, ttlParams)
+ if apiErr != nil && aH.HandleError(w, apiErr.Err, http.StatusInternalServerError) {
return
}
aH.WriteJSON(w, r, result)