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

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist
2021-03-29 15:47:16 +02:00
committed by GitHub
parent 636be0ed22
commit e1458391bb
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