status property is not a string
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/oauth2"
|
||||
@@ -121,8 +120,9 @@ func UpdateProperty(c *Config, p []properties.PropertyUpdateOrCreate) error {
|
||||
log.Fatal(err)
|
||||
return err
|
||||
}
|
||||
if strings.HasPrefix("2", res.Status) {
|
||||
log.Error(rp[0].Status + rp[0].Description)
|
||||
|
||||
if rp[0].Status >= 400 {
|
||||
log.Error(fmt.Sprint(rp[0].Status) + ":" + rp[0].Description)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -162,7 +162,7 @@ func DeleteProperty(c *Config, p []properties.PropertyDelete) error {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Debug(string(response))
|
||||
log.Debug("client.DeleteProperty: response is " + string(response))
|
||||
|
||||
rp := []properties.PropertyDelete{}
|
||||
|
||||
@@ -172,8 +172,8 @@ func DeleteProperty(c *Config, p []properties.PropertyDelete) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if strings.HasPrefix("2", res.Status) {
|
||||
log.Error(rp[0].Status + rp[0].Description)
|
||||
if rp[0].Status >= 400 {
|
||||
log.Error(fmt.Sprint(rp[0].Status) + ":" + rp[0].Description)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user