FHIR Chat · Crucible format tests have issues with http 406 responses · implementers

Stream: implementers

Topic: Crucible format tests have issues with http 406 responses


view this post on Zulip Florian Apolloner (Mar 25 2019 at 12:29):

@Robert Scanlon I hope it is okay to mention you here directly since you have been so active on the crucible issues. If you prefer bug reports somewhere else, please tell me where I should submit them.

I noticed that my format tests fail at https://projectcrucible.org/servers/5c89107d04ebd024be000000#5c98c75d04ebd03124000011/format001/FT07 due to a wrong response code. Now crucible does expect 415 when it sends an invalid accept header: "Accept: application/foobar". According to the http specs, the proper header here would actually be 406 ( https://tools.ietf.org/html/rfc7231#section-6.5.6 ) . This is not clearly defined in STU3 which just says to follow http semantics but is better defined in R4 (http://hl7.org/fhir/http.html#mime-type -- last bullet in "implementation note").

To summarize: if the Content-Type is wrong 415 is the correct response, if accepts/_format is wrong then 406 is the correct answer. It would be great if crucible could get updated to support either 415 or 406 if the accept/_format is wrong.

The next test (https://projectcrucible.org/servers/5c89107d04ebd024be000000#5c98c75d04ebd03124000011/format001/FT08) fails due to the same reason but it has a twist: here you are sending an invalid Accept header as well as _format, which means you aren't really testing if _format alone is enough. It would be good to drop the Accept header from this request.

view this post on Zulip Robert Scanlon (Mar 25 2019 at 12:56):

@Florian Apolloner -- there is a specific #crucible stream on here, so that is probably the best place to post these questions / issues in the future because this is a tool-specific. Either there or the GitHub issues for crucible works (https://github.com/fhir-crucible/crucible/issues).

view this post on Zulip Robert Scanlon (Mar 25 2019 at 13:15):

It does appear that this test needs to be updated now that FHIR adds clarifying information in R4. We'll take a closer look and will update here as soon as possible. Thanks!


Last updated: Apr 12 2022 at 19:14 UTC