FHIR Chat · Response code for incomplete data · implementers

Stream: implementers

Topic: Response code for incomplete data


view this post on Zulip Saren Currie (Mar 01 2017 at 01:14):

We're currently implementing an aggregated FHIR API and were wondering what HTTP status code to return when one of the sources is in error and so the data is incomplete. We were intending to return whatever data was available with an operation outcome to notify consumers that the data is incomplete, but we're not sure what HTTP status would be best for this situation.

view this post on Zulip Grahame Grieve (Mar 01 2017 at 02:18):

I think the status is 200 - the search operation succeeded, with an operation outcome indicating that data is incomplete for some reason

view this post on Zulip Saren Currie (Mar 01 2017 at 02:23):

We were thinking that 200 might be misleading. Consumers of the API might see that and assume that there is nothing wrong with the response (even though assuming incomplete data is complete could be a significant risk).

view this post on Zulip Grahame Grieve (Mar 01 2017 at 02:27):

well, all you can do is write in your documentation that an OperationOutcome must be displayed to the user, I think

view this post on Zulip Brian Postlethwaite (Mar 01 2017 at 02:52):

And the specific issue code in that operation outcome (as some of those searches may also return operation outcomes with their own issues)

view this post on Zulip Saren Currie (Mar 01 2017 at 03:01):

I don't think you can necessarily rely on all consumers of the API having comprehensive understanding of the documentation. Personally, I would interpret a 200 code as a response with nothing wrong with it.

view this post on Zulip Grahame Grieve (Mar 01 2017 at 03:26):

yes. where as a 4xx or 5xx will be interpreted as total failure

view this post on Zulip Lloyd McKenzie (Mar 01 2017 at 03:40):

200 just says "some aspects executed successfully". You get a 200 on a batch response too - even if all of the entries in the batch failed.


Last updated: Apr 12 2022 at 19:14 UTC