From 66d13cf51eac113cb7fa5a4cb7a35c1b99611caa Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 18 Jul 2019 23:00:14 +0100 Subject: [PATCH] Show alert when action fails. --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index e3de3e7..0ed0674 100644 --- a/client.go +++ b/client.go @@ -89,6 +89,9 @@ func (client *Client) Run() error { for _, f := range client.handlers[event.Event] { if err := f(ctx, client, event); err != nil { log.Printf("error in handler for event %v: %v\n", event.Event, err) + if err := client.ShowAlert(ctx); err != nil { + log.Printf("error trying to show alert") + } } } continue