Skip to content

Commit

Permalink
fix(ifttt): treat all 2xx http responses as success (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
eoleedi authored Jul 12, 2023
1 parent 11cd546 commit 677162d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/services/ifttt/ifttt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package ifttt
import (
"bytes"
"fmt"
"github.com/containrrr/shoutrrr/pkg/format"
"net/http"
"net/url"

"github.com/containrrr/shoutrrr/pkg/format"

"github.com/containrrr/shoutrrr/pkg/services/standard"
"github.com/containrrr/shoutrrr/pkg/types"
)
Expand Down Expand Up @@ -72,7 +73,7 @@ func doSend(payload []byte, postURL string) error {
if err != nil {
return err
}
if res.StatusCode != http.StatusNoContent {
if res.StatusCode > 299 || res.StatusCode < 200 {
return fmt.Errorf("got response status code %s", res.Status)
}
return nil
Expand Down

0 comments on commit 677162d

Please sign in to comment.