projecttacoma / fqm-execution

fqm-execution is a library that allows users to calculate FHIR-based electronic Clinical Quality Measures (eCQMs) and retrieve the results in a variety of formats
https://projecttacoma.github.io/fqm-execution/
Apache License 2.0
17 stars 6 forks source link

Add conditional to error.message to avoid type error #269

Closed elsaperelli closed 11 months ago

elsaperelli commented 11 months ago

Summary

When trying to run dataRequirements on the measure bundles and test cases in this issue, I got a Cannot read properties of undefined (reading 'message') error. (Initially noticed when trying to look at these test cases in fqm-testify) This prevents this error from being thrown.

New behavior

Code changes

Testing guidance

github-actions[bot] commented 11 months ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟒 Statements 85.99% 2308/2684
🟑 Branches
73.01% (+0% πŸ”Ό)
2129/2916
🟒 Functions 89.05% 423/475
🟒 Lines 86.33% 2230/2583
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------ | :--------- | :------------------------------------------------------ | :-------- | :---- | | 🟒 |
`...` / GracefulError.ts
| 100% |
80% (-20% πŸ”»)
| 100% | 100% |

Test suite run success

433 tests passing in 31 suites.

Report generated by πŸ§ͺjest coverage report action from e96056fc8f9576aa7c116b8591e672bacab8fdff