Skip to content

Commit 7980594

Browse files
Merge pull request #4353 from m-burst/patch-1
Fix error handling in template rendering for Telegram
2 parents c88eb78 + 2991739 commit 7980594

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

notify/telegram/telegram.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err
8080
}
8181

8282
messageText, truncated := notify.TruncateInRunes(tmpl(n.conf.Message), maxMessageLenRunes)
83+
if err != nil {
84+
return false, err
85+
}
8386
if truncated {
8487
n.logger.Warn("Truncated message", "alert", key, "max_runes", maxMessageLenRunes)
8588
}

0 commit comments

Comments
 (0)