FHIR Chat · warnings on successful create · implementers

Stream: implementers

Topic: warnings on successful create


view this post on Zulip Josh Mandel (Feb 09 2017 at 18:31):

Reading through http://hl7.org/fhir/http.html#create I can't quite tell: if I want to successfully create a new resource from a POST, but I also want to return some warnings highlighting issues with the content: can I return a successful response *and* an OperationOutcome?

view this post on Zulip Lloyd McKenzie (Feb 09 2017 at 18:45):

No. You can get warnings or content but not both. The only way to return both was to send one as a header or to throw both in the body and the belief at the time the decision was made is the use-case was esoteric enough that it didn't justify adding that sort of ugliness

view this post on Zulip Grahame Grieve (Feb 09 2017 at 19:04):

there's a preference header for the client to decide what it wants to see - the created resource, or warnings. If the client says so, you can return warnings along with a 201 created

view this post on Zulip Josh Mandel (Feb 09 2017 at 19:06):

Thanks @Grahame Grieve (I had assumed a body was illegal with 201 status, but it looks OK)


Last updated: Apr 12 2022 at 19:14 UTC