fix(common.cookie): Allow any 2xx status code (#12515)
This commit is contained in:
parent
5cc626f161
commit
f08cac618c
|
|
@ -115,8 +115,7 @@ func (c *CookieAuthConfig) auth() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// check either 200 or 201 as some devices may return either
|
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {
|
|
||||||
return fmt.Errorf("cookie auth renewal received status code: %v (%v) [%v]",
|
return fmt.Errorf("cookie auth renewal received status code: %v (%v) [%v]",
|
||||||
resp.StatusCode,
|
resp.StatusCode,
|
||||||
http.StatusText(resp.StatusCode),
|
http.StatusText(resp.StatusCode),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue