Loosened expected status codes from twitch

This commit is contained in:
Asaf Gartner 2022-03-22 20:34:42 +02:00
parent 11dd75ad03
commit c8096b0fb7
1 changed files with 2 additions and 2 deletions

View File

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