fix(common.cookie): Allow any 2xx status code (#12515)

This commit is contained in:
Joshua Powers 2023-01-18 03:19:19 -07:00 committed by GitHub
parent 5cc626f161
commit f08cac618c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -115,8 +115,7 @@ func (c *CookieAuthConfig) auth() error {
return err
}
// check either 200 or 201 as some devices may return either
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return fmt.Errorf("cookie auth renewal received status code: %v (%v) [%v]",
resp.StatusCode,
http.StatusText(resp.StatusCode),