The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/services/query/errors.go

17 lines
367 B

package query
import "fmt"
// ErrBadQuery returned whenever request is malformed and must contain a message
// suitable to return in API response.
type ErrBadQuery struct {
Message string
}
func NewErrBadQuery(msg string) *ErrBadQuery {
return &ErrBadQuery{Message: msg}
}
func (e ErrBadQuery) Error() string {
return fmt.Sprintf("bad query: %s", e.Message)
}