|
|
@@ -317,8 +317,9 @@ func getRetailPrice(region string, skuName string, currencyCode string, spot boo
|
|
|
if err != nil {
|
|
|
return "", fmt.Errorf("failed to fetch retail price with URL \"%s\": %w", pricingURL, err)
|
|
|
}
|
|
|
+ defer resp.Body.Close()
|
|
|
|
|
|
- if resp.StatusCode < 200 && resp.StatusCode > 299 {
|
|
|
+ if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
|
|
return "", fmt.Errorf("retail price responded with error status code %d", resp.StatusCode)
|
|
|
}
|
|
|
|