mirror of
https://github.com/resmoio/kubernetes-event-exporter.git
synced 2026-08-24 01:06:22 +00:00
Treat all 2xx succesful in webhook, fixes #57
This commit is contained in:
@@ -53,8 +53,7 @@ func (w *Webhook) Send(ctx context.Context, ev *kube.EnhancedEvent) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: make this prettier please
|
||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {
|
||||
if resp.StatusCode >= 200 && resp.StatusCode < 300{
|
||||
return errors.New("not 200/201: " + string(body))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user