microsoft / microsoft/fhir-server

Incorrect code for _revinclude bad request

Open
#1,319 2 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #1351 by @eladiw — merged
Bug Good First Issue KI-Warning Up for grabs
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.