Use status code constants
This commit is contained in:
@@ -452,7 +452,7 @@ func (rd *RealDebrid) fetchPageOfDownloads(page, limit int) ([]Download, int, er
|
||||
return downloads, 0, nil
|
||||
}
|
||||
|
||||
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
err := fmt.Errorf("unexpected status code: %d", resp.StatusCode)
|
||||
rd.log.Errorf("Error when executing the get downloads request: %v", err)
|
||||
return nil, 0, err
|
||||
|
||||
Reference in New Issue
Block a user