Skip to content

Commit 6c8123e

Browse files
authored
Merge pull request #843 from patrickpaul-tereina/patrick/teams-202-fix
updated teams webhook returns 202
2 parents d4c6c26 + 7ebf7c1 commit 6c8123e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/notification/teams/teams.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ func (s *sender) Send(event types.EventNotification) error {
130130

131131
// Send notification via HTTP POST.
132132
resp, err := s.client.Post(s.endpoint, "application/json", bytes.NewBuffer(jsonNotification))
133-
if err != nil || resp == nil || (resp.StatusCode != 200 && resp.StatusCode != 201) {
133+
if err != nil || resp == nil || (resp.StatusCode != 200 && resp.StatusCode != 201 && resp.StatusCode != 202) {
134134
if resp != nil {
135-
return fmt.Errorf("got status %d, expected 200/201", resp.StatusCode)
135+
return fmt.Errorf("got status %d, expected 200/201/202", resp.StatusCode)
136136
}
137137
return err
138138
}

0 commit comments

Comments
 (0)