mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-27 08:32:15 +00:00
Add error check when creating sns session
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
This commit is contained in:
parent
1322abdc08
commit
077b20dd9a
@ -83,6 +83,13 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err
|
||||
},
|
||||
Profile: n.conf.Sigv4.Profile,
|
||||
})
|
||||
if err != nil {
|
||||
if e, ok := err.(awserr.RequestFailure); ok {
|
||||
return n.retrier.Check(e.StatusCode(), strings.NewReader(e.Message()))
|
||||
} else {
|
||||
return true, err
|
||||
}
|
||||
}
|
||||
|
||||
if n.conf.Sigv4.RoleARN != "" {
|
||||
var stsSess *session.Session
|
||||
|
Loading…
Reference in New Issue
Block a user