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

Ensure most cases of IllegalArgumentException for measures and caregaps are converted to FHIR InvalidRequestException #599

Conversation

lukedegruchy
Copy link
Contributor

@lukedegruchy lukedegruchy commented Nov 26, 2024

  • Convert all most cases of IllegalArgumentException for measures and caregaps are converted to FHIR InvalidRequestException where they make sense to ensure end users see 400 status codes in cases of user error
  • Adjust tests

Closes #596

…ps are converted to InvalidRequestException with additional context.
@lukedegruchy lukedegruchy changed the title Ensure most cases of IllegalArgumentException for measures and carega… Ensure most cases of IllegalArgumentException for measures and caregaps are converted to InvalidRequestException Nov 26, 2024
…argumentexception-to-invalidrequestexception
Copy link

github-actions bot commented Nov 26, 2024

Formatting check succeeded!

@lukedegruchy lukedegruchy marked this pull request as ready for review November 26, 2024 21:48
@lukedegruchy lukedegruchy changed the title Ensure most cases of IllegalArgumentException for measures and caregaps are converted to InvalidRequestException Ensure most cases of IllegalArgumentException for measures and caregaps are converted to FHIR InvalidRequestException Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 61.17647% with 33 lines in your changes missing coverage. Please review.

Project coverage is 73.81%. Comparing base (332eb29) to head (3429a91).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...cqf/fhir/cr/measure/r4/R4MeasureReportBuilder.java 28.57% 10 Missing ⚠️
...s/cqf/fhir/cr/measure/common/MeasureEvaluator.java 22.22% 7 Missing ⚠️
...hir/cr/measure/r4/utils/R4MeasureServiceUtils.java 25.00% 3 Missing ⚠️
.../fhir/cr/measure/common/BaseMeasureEvaluation.java 0.00% 2 Missing ⚠️
...ir/cr/measure/dstu3/Dstu3MeasureReportBuilder.java 33.33% 2 Missing ⚠️
...ds/cqf/fhir/cr/measure/r4/R4MeasureDefBuilder.java 88.88% 2 Missing ⚠️
.../cqf/fhir/cr/measure/r4/R4MeasureReportScorer.java 75.00% 2 Missing ⚠️
.../fhir/cr/measure/dstu3/Dstu3MeasureDefBuilder.java 75.00% 1 Missing ⚠️
.../fhir/cr/measure/dstu3/Dstu3MeasureEvaluation.java 0.00% 1 Missing ⚠️
...f/fhir/cr/measure/dstu3/Dstu3MeasureProcessor.java 50.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #599      +/-   ##
============================================
- Coverage     73.83%   73.81%   -0.02%     
  Complexity       19       19              
============================================
  Files           361      361              
  Lines         18916    18938      +22     
  Branches       2524     2524              
============================================
+ Hits          13966    13979      +13     
- Misses         3597     3606       +9     
  Partials       1353     1353              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@barhodes barhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Touching lots of code like this exposes our gaps in test coverage. Would be great to add some tests to address some of them.

…argumentexception-to-invalidrequestexception
@lukedegruchy lukedegruchy enabled auto-merge (squash) December 3, 2024 16:22
Copy link

sonarqubecloud bot commented Dec 3, 2024

@lukedegruchy lukedegruchy merged commit 3916f70 into master Dec 3, 2024
8 checks passed
@lukedegruchy lukedegruchy deleted the ld-20241126-illegalargumentexception-to-invalidrequestexception branch December 3, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants