frontier icon indicating copy to clipboard operation
frontier copied to clipboard

fix: remove unreachable product fetch block

Open anujk14 opened this issue 1 year ago • 2 comments

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.

anujk14 avatar Aug 30 '24 07:08 anujk14

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

vercel[bot] avatar Aug 30 '24 07:08 vercel[bot]

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%
<!-- Total: 23
Totals Coverage Status
Change from base Build 10628472009: -0.02%
Covered Lines: 10524
Relevant Lines: 110716

💛 - Coveralls

coveralls avatar Aug 30 '24 09:08 coveralls