Show alert when action fails.
This commit is contained in:
parent
503477a3c3
commit
66d13cf51e
@ -89,6 +89,9 @@ func (client *Client) Run() error {
|
|||||||
for _, f := range client.handlers[event.Event] {
|
for _, f := range client.handlers[event.Event] {
|
||||||
if err := f(ctx, client, event); err != nil {
|
if err := f(ctx, client, event); err != nil {
|
||||||
log.Printf("error in handler for event %v: %v\n", event.Event, err)
|
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
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user