Vermonster / fhir-kit-client

Node.js FHIR client library
MIT License
173 stars 37 forks source link

Throw error is the resourceType is not valid #168

Closed bkaney closed 2 years ago

bkaney commented 2 years ago

This prevents possible url injections.

bkaney commented 2 years ago

@fungiboletus please take a look at this PR. Thanks!

fungiboletus commented 2 years ago

Hello,

It looks good to me ! Maybe you could throw the exception in the utility function instead of returning a boolean and throwing an exception in many places, but that's just personal preferences regarding code style.

Thanks for doing the fix 🙂 I have recently changed job, but I'm sure my previous team will be happy about the change.