updated teams webhook returns 202
parent
d4c6c2688f
commit
7ebf7c17f2
|
|
@ -130,9 +130,9 @@ func (s *sender) Send(event types.EventNotification) error {
|
|||
|
||||
// Send notification via HTTP POST.
|
||||
resp, err := s.client.Post(s.endpoint, "application/json", bytes.NewBuffer(jsonNotification))
|
||||
if err != nil || resp == nil || (resp.StatusCode != 200 && resp.StatusCode != 201) {
|
||||
if err != nil || resp == nil || (resp.StatusCode != 200 && resp.StatusCode != 201 && resp.StatusCode != 202) {
|
||||
if resp != nil {
|
||||
return fmt.Errorf("got status %d, expected 200/201", resp.StatusCode)
|
||||
return fmt.Errorf("got status %d, expected 200/201/202", resp.StatusCode)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue