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: remove unreachable product fetch block #759

Merged
merged 2 commits into from
Sep 2, 2024
Merged

fix: remove unreachable product fetch block #759

merged 2 commits into from
Sep 2, 2024

Conversation

anujk14
Copy link
Contributor

@anujk14 anujk14 commented Aug 30, 2024

Per documentation, the entitlement check should work with both, product id as well as feature id.
However, this is what the actual behaviour is:

  1. We try to fetch the feature by feature id
  2. In case there is no feature, we return an error
  3. Thus, even if someone tries to check entitlement with product id, they would never be able to do so since we would never reach the product block once feature check fails.

This PR updates the method to work with only feature IDs, as that is what the existing behaviour is.

Copy link

vercel bot commented Aug 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 8:58am

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10629829768

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 23 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 9.505%

Files with Coverage Reduction New Missed Lines %
billing/entitlement/mocks/product_service.go 23 46.28%
Totals Coverage Status
Change from base Build 10628472009: -0.02%
Covered Lines: 10524
Relevant Lines: 110716

💛 - Coveralls

@anujk14 anujk14 merged commit c9331fc into main Sep 2, 2024
7 checks passed
@anujk14 anujk14 deleted the check-fix branch September 2, 2024 06:21
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.

3 participants