jembi / openhim-mediator-mapping

An OpenHIM mediator for mapping incoming content to a different format
https://jembi.github.io/openhim-mediator-mapping/
MIT License
3 stars 6 forks source link

Tb 183 fix bug in reading lookup requests' responses #208

Closed bradsawadye closed 9 months ago

bradsawadye commented 9 months ago

When the lookup request is to an openhim mediator, the response body is returned as a string nested in an object. This makes it complicated to use the response body in the mappings. This logic added changes the response body into an object that can be easily used. It also ensures that all the orchestrations are recorded

codecov[bot] commented 9 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (d36abfb) 96.80% compared to head (4ab3b40) 96.72%. Report is 1 commits behind head on master.

:exclamation: Current head 4ab3b40 differs from pull request most recent head 2ddf6e5. Consider uploading reports for the commit 2ddf6e5 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #208 +/- ## ========================================== - Coverage 96.80% 96.72% -0.09% ========================================== Files 23 23 Lines 1065 1068 +3 ========================================== + Hits 1031 1033 +2 - Misses 34 35 +1 ``` | [Files](https://app.codecov.io/gh/jembi/openhim-mediator-mapping/pull/208?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jembi) | Coverage Δ | | |---|---|---| | [src/middleware/externalRequests.js](https://app.codecov.io/gh/jembi/openhim-mediator-mapping/pull/208?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jembi#diff-c3JjL21pZGRsZXdhcmUvZXh0ZXJuYWxSZXF1ZXN0cy5qcw==) | `97.88% <100.00%> (-0.34%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.