Rename the "gfitsync" package to "kraftakt".
[kraftakt.git] / fitbit / fitbit.go
index 4555e22..90457d2 100644 (file)
@@ -11,7 +11,7 @@ import (
        "net/http"
        "time"
 
-       "github.com/octo/gfitsync/app"
+       "github.com/octo/kraftakt/app"
        "golang.org/x/oauth2"
        oauth2fitbit "golang.org/x/oauth2/fitbit"
        "google.golang.org/appengine/log"
@@ -188,7 +188,7 @@ func (c *Client) Subscribe(ctx context.Context, collection string) error {
        }
        defer res.Body.Close()
 
-       if res.StatusCode >= 400 {
+       if res.StatusCode >= 400 && res.StatusCode != http.StatusConflict {
                data, _ := ioutil.ReadAll(res.Body)
                log.Errorf(ctx, "creating subscription failed: status %d %q", res.StatusCode, data)
                return fmt.Errorf("creating subscription failed")