FHIRPath evaluator should throw when string function is invoked on non-string #3805
Closed
Description
Describe the bug
http://hl7.org/fhirpath/N1/#string-manipulation says this about the String functions in this section:
If there is more than one item, or an item that is not a String, the evaluation of the expression will end and signal an error to the calling environment.
However, users report that our engine returns empty in this case instead of throwing.
Environment
4.11.1
To Reproduce
See https://chat.fhir.org/#narrow/stream/179266-fhirpath/topic/error.20handling
Expected behavior
"the evaluation of the expression will end and signal an error to the calling environment"
Additional context