adlio / trello

Trello API wrapper for Go
MIT License
219 stars 71 forks source link

Post() was not handling HTTP errors. #55

Closed alecthomas closed 4 years ago

alecthomas commented 4 years ago

Factor out common code so response handling is consistent.

alecthomas commented 4 years ago

There's opportunity for factoring out more common code across these methods, as they are all almost identical, but this more minimal change fixes the bug with Post().

codecov-io commented 4 years ago

Codecov Report

Merging #55 into master will increase coverage by 1.15%. The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   76.82%   77.98%   +1.15%     
==========================================
  Files          21       21              
  Lines         850      822      -28     
==========================================
- Hits          653      641      -12     
+ Misses        159      151       -8     
+ Partials       38       30       -8
Impacted Files Coverage Δ
client.go 82.41% <81.81%> (+9.3%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0f19bd4...a5c95e5. Read the comment docs.

adlio commented 4 years ago

@alecthomas Thank you for the refactoring and bugfix.