From: Florian Forster Date: Tue, 30 Jan 2018 09:12:09 +0000 (+0100) Subject: Package fitbit: Ignore 404 (Not Found) errors when unsubscribing. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=92093b34c3443824b0ce6de91acc86469636ce2f;p=kraftakt.git Package fitbit: Ignore 404 (Not Found) errors when unsubscribing. --- diff --git a/fitbit/fitbit.go b/fitbit/fitbit.go index 775ab78..36a6e87 100644 --- a/fitbit/fitbit.go +++ b/fitbit/fitbit.go @@ -218,7 +218,7 @@ func (c *Client) Unsubscribe(ctx context.Context, collection string) error { } defer res.Body.Close() - if res.StatusCode >= 400 && res.StatusCode != http.StatusConflict { + if res.StatusCode >= 400 && res.StatusCode != http.StatusNotFound { data, _ := ioutil.ReadAll(res.Body) log.Errorf(ctx, "deleting %q subscription failed: status %d %q", collection, res.StatusCode, data) return fmt.Errorf("deleting %q subscription failed", collection)