diff --git a/src/twitch/rest.go b/src/twitch/rest.go index c697ac2..03960ba 100644 --- a/src/twitch/rest.go +++ b/src/twitch/rest.go @@ -271,7 +271,7 @@ func subscribeToEvent(ctx context.Context, eventType string, twitchID string) er } defer readAndClose(res) - if res.StatusCode != 201 { + if res.StatusCode >= 300 { body, err := io.ReadAll(res.Body) res.Body.Close() if err != nil { @@ -296,7 +296,7 @@ func unsubscribeFromEvent(ctx context.Context, eventID string) error { } defer readAndClose(res) - if res.StatusCode != 204 { + if res.StatusCode > 300 { body, err := io.ReadAll(res.Body) res.Body.Close() if err != nil {