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

fix: unexpected end of JSON input error when rate limit exceeded #292

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

MAE776569
Copy link
Contributor

  • This PR is a:

    • Bug fix
  • Description
    SyntaxError: Unexpected end of JSON input error is thrown when the rate limit is exceeded due to an error in parsing the response.
    When the rate limit is exceeded the response.body.json() function throws an error because the response body is empty.

@arjunkomath
Copy link
Owner

arjunkomath commented Nov 5, 2022

@MAE776569 tests are failing

@MAE776569
Copy link
Contributor Author

@arjunkomath fixed the issues that cause tests to fail

@MAE776569
Copy link
Contributor Author

MAE776569 commented Nov 6, 2022

@arjunkomath fixed the issues that cause tests to fail

@arjunkomath done

@codecov
Copy link

codecov bot commented Nov 6, 2022

Codecov Report

Base: 78.94% // Head: 79.05% // Increases project coverage by +0.11% 🎉

Coverage data is based on head (00cf7f3) compared to base (8200787).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #292      +/-   ##
==========================================
+ Coverage   78.94%   79.05%   +0.11%     
==========================================
  Files           2        2              
  Lines         190      191       +1     
==========================================
+ Hits          150      151       +1     
  Misses         40       40              
Impacted Files Coverage Δ
lib/utils.js 98.71% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MAE776569
Copy link
Contributor Author

@arjunkomath all done check test coverage

@arjunkomath arjunkomath merged commit 4e9ba17 into arjunkomath:master Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants