Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle querying the bits when the bits have not been set #12

Merged
merged 9 commits into from Jan 13, 2021
Merged

Properly handle querying the bits when the bits have not been set #12

merged 9 commits into from Jan 13, 2021

Conversation

peter-meemo
Copy link
Contributor

Apple returns a bare string in the response with a 200 http code in this case. Since the master code only checks for error if the code is not 200, it will try to parse the bare string as json and die. The README states

// Note that SDK returns ErrBitStateNotFound error if no bits found

This PR creates and returns that error.

@codecov
Copy link

codecov bot commented Jan 12, 2021

Codecov Report

Merging #12 (09986da) into master (ba52372) will decrease coverage by 4.06%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
- Coverage   92.14%   88.07%   -4.07%     
==========================================
  Files           9        9              
  Lines         140      151      +11     
==========================================
+ Hits          129      133       +4     
- Misses          7       12       +5     
- Partials        4        6       +2     
Impacted Files Coverage Δ
error.go 86.36% <40.00%> (-13.64%) ⬇️
query.go 75.86% <44.44%> (-11.10%) ⬇️

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 ba52372...09986da. Read the comment docs.

@rinchsan
Copy link
Owner

rinchsan commented Jan 13, 2021

@peter-meemo
Thank you for your work!
I will tidy some codes, add some tests in a new branch, and release a new minor version with this bug fixes as soon as possible.

@rinchsan rinchsan added the minor Minor changes label Jan 13, 2021
@rinchsan rinchsan merged commit 6ab2ab8 into rinchsan:master Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Minor changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants