microsoft / microsoft/fhir-server
Incorrect code for _revinclude bad request
A pull request for this has already been merged.
- #1351 by @eladiw — merged
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
The main bug for this has been resolved but there are still some incorrect status codes. We should return the correct status code.
Describe the bug
Incorrect code for _revinclude bad request
To Reproduce
Hit request /Observation?_revinclude=MedicationRequest:observation
OperationOutcome is returned for status - 400 Bad Request
Expected behavior
- "code": "invalid".
- Refer to the spec for cases where the http status code should change to 403
Actual behavior
- "code": "forbidden".
- Status code is always 400
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the request /Observation?_revinclude=MedicationRequest:observation and inspect the returned OperationOutcome and HTTP status. Compare the observed "forbidden"/400 response with the FHIR search error specification, then verify that the relevant bad-request cases return "invalid" and that cases covered by the specification use 403.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100