projects
/
kraftakt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c7b039
)
Package fitbit: Don't treat Conflict (409) as an error.
author
Florian Forster
<ff@octo.it>
Fri, 26 Jan 2018 20:43:27 +0000
(21:43 +0100)
committer
Florian Forster
<ff@octo.it>
Fri, 26 Jan 2018 20:43:27 +0000
(21:43 +0100)
fitbit/fitbit.go
patch
|
blob
|
history
diff --git
a/fitbit/fitbit.go
b/fitbit/fitbit.go
index
4555e22
..
bde96ff
100644
(file)
--- a/
fitbit/fitbit.go
+++ b/
fitbit/fitbit.go
@@
-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")