projects
/
kraftakt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52cd11f
)
Package fitbit: Ignore 404 (Not Found) errors when unsubscribing.
author
Florian Forster
<ff@octo.it>
Tue, 30 Jan 2018 09:12:09 +0000
(10:12 +0100)
committer
Florian Forster
<ff@octo.it>
Tue, 30 Jan 2018 09:12:09 +0000
(10:12 +0100)
fitbit/fitbit.go
patch
|
blob
|
history
diff --git
a/fitbit/fitbit.go
b/fitbit/fitbit.go
index
775ab78
..
36a6e87
100644
(file)
--- 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.Status
Conflict
{
+ if res.StatusCode >= 400 && res.StatusCode != http.Status
NotFound
{
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)