alerting: handle invalid json format

closes #11003
This commit is contained in:
bergquist
2018-04-10 22:22:12 +02:00
parent 9e1a1ed572
commit 93e1546f73

View File

@@ -72,7 +72,10 @@ func (this *DingDingNotifier) Notify(evalContext *alerting.EvalContext) error {
this.log.Error("Failed to create Json data", "error", err, "dingding", this.Name) this.log.Error("Failed to create Json data", "error", err, "dingding", this.Name)
} }
body, _ := bodyJSON.MarshalJSON() body, err := bodyJSON.MarshalJSON()
if err != nil {
return err
}
cmd := &m.SendWebhookSync{ cmd := &m.SendWebhookSync{
Url: this.Url, Url: this.Url,