mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 19:30:36 -06:00
c0ff685d3b
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
18 lines
367 B
Go
18 lines
367 B
Go
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)
|
|
}
|