FirelyTeam / firely-net-sdk

The official Firely .NET SDK for HL7 FHIR
Other
829 stars 345 forks source link

plain/text responses are not support for OperationAsync #2924

Open fonzmeister opened 1 month ago

fonzmeister commented 1 month ago

:information_source: Do you want to ask something or start a discussion, then go here

:information_source: Is your bug report about Firely Server Facade, please send an email to server@fire.ly or submit a bug report to Jira if you are a paying customer.

Describe the bug The function ReadResourceFromMessage throws an exception whenever the response type is not a json/xml. However, for the $convert-data endpoint supported by fhir an plain/text is returned. Please refer to https://github.com/microsoft/fhir-server/blob/main/docs/ConvertDataOperation.md

Note the Content-Type is the response header is set to text/plain because the output format is determined by the mapping definition from your templates.

To Reproduce Steps to reproduce the behavior:

  1. send a $convert-data request using FhirClient.OperationAsync
  2. See error: Image

Expected behavior I would expect these return types to be supported since it is part of the fhir standard

Screenshots If applicable, add screenshots to help explain your problem.

Version used: