From 92093b34c3443824b0ce6de91acc86469636ce2f Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 30 Jan 2018 10:12:09 +0100 Subject: [PATCH] Package fitbit: Ignore 404 (Not Found) errors when unsubscribing. --- fitbit/fitbit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.11.0