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 error message (#1080)

Ahsan Barkati6c505f9e8642
diff --git a/pkg/query-service/app/http_handler.go b/pkg/query-service/app/http_handler.go
index f2edf14e6f..a3023ef92c 100644
--- a/pkg/query-service/app/http_handler.go
+++ b/pkg/query-service/app/http_handler.go
@@ -205,7 +205,7 @@ func ViewAccess(f func(http.ResponseWriter, *http.Request)) http.HandlerFunc {
if !(auth.IsViewer(user) || auth.IsEditor(user) || auth.IsAdmin(user)) {
respondError(w, &model.ApiError{
Typ: model.ErrorForbidden,
- Err: errors.New("API is not accessible to the viewers."),
+ Err: errors.New("API is accessible to viewers/editors/admins."),
}, nil)
return
}
@@ -226,7 +226,7 @@ func EditAccess(f func(http.ResponseWriter, *http.Request)) http.HandlerFunc {
if !(auth.IsEditor(user) || auth.IsAdmin(user)) {
respondError(w, &model.ApiError{
Typ: model.ErrorForbidden,
- Err: errors.New("API is not accessible to the editors."),
+ Err: errors.New("API is accessible to editors/admins."),
}, nil)
return
}
@@ -248,7 +248,7 @@ func SelfAccess(f func(http.ResponseWriter, *http.Request)) http.HandlerFunc {
if !(auth.IsSelfAccessRequest(user, id) || auth.IsAdmin(user)) {
respondError(w, &model.ApiError{
Typ: model.ErrorForbidden,
- Err: errors.New("API accessible only for self userId or admins."),
+ Err: errors.New("API is accessible for self access or to the admins."),
}, nil)
return
}
@@ -269,7 +269,7 @@ func AdminAccess(f func(http.ResponseWriter, *http.Request)) http.HandlerFunc {
if !auth.IsAdmin(user) {
respondError(w, &model.ApiError{
Typ: model.ErrorForbidden,
- Err: errors.New("API accessible only to the admins"),
+ Err: errors.New("API is accessible to admins only"),
}, nil)
return
}