updated teams webhook returns 202

pull/843/head
Patrick Paul 2026-02-25 23:09:35 -08:00
parent d4c6c2688f
commit 7ebf7c17f2
1 changed files with 2 additions and 2 deletions

View File

@ -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
}