include error message in email notification (#8392)

This commit is contained in:
Dan Cech
2017-05-17 09:51:51 +02:00
committed by Torkel Ödegaard
parent 820671d6cc
commit 9dc220b8e2
4 changed files with 54 additions and 1 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package alerting
import (
"context"
"fmt"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/components/null"
@@ -56,7 +57,7 @@ func createTestEvalContext(cmd *NotificationTestCommand) *EvalContext {
}
ctx.IsTestRun = true
ctx.Firing = true
ctx.Error = nil
ctx.Error = fmt.Errorf("This is only a test")
ctx.EvalMatches = evalMatchesBasedOnState()
return ctx