API: Return 400 on invalid Annotation requests (#32429) (#32431)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit e1458391bb)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2021-03-29 16:13:56 +02:00
committed by GitHub
co-authored by Carl Bergquist
parent 0c208a31dd
commit b0314c0818
3 changed files with 14 additions and 5 deletions
+5
View File
@@ -2,11 +2,16 @@ package annotations
import (
"context"
"errors"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/setting"
)
var (
ErrTimerangeMissing = errors.New("missing timerange")
)
type Repository interface {
Save(item *Item) error
Update(item *Item) error