Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Error Handling on Non-Existing Patient #1104

Closed
alexanderkiel opened this issue Sep 1, 2023 · 0 comments
Closed

Fix Error Handling on Non-Existing Patient #1104

alexanderkiel opened this issue Sep 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working module:patient-everything
Milestone

Comments

@alexanderkiel
Copy link
Member

Problem

In case the $everything operation is called on a non-existing patient, a 200 with an empty bundle instead of a 404 with an OperationOutcome is returned.

Current Behaviour

In case the $everything operation is called on a non-existing patient, a 200 with an empty bundle is returned.

Example

curl -H "Accept: application/fhir+json" "[base]/Patient/150158/$everything" 
{
    "resourceType": "Bundle",
    "id": "DCSQ4ASBATVWSO6O",
    "type": "searchset",
    "total": 0
}

Expected Behaviour

A 404 with an OperationOutcome should be returned.

Example

curl -H "Accept: application/fhir+json" "[base]/Patient/150158/$everything" 
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "not-found",
      "diagnostics": "The Patient with id `150158` was not found."
    }
  ]
}
@alexanderkiel alexanderkiel added bug Something isn't working module:patient-everything labels Sep 1, 2023
@alexanderkiel alexanderkiel self-assigned this Sep 1, 2023
@alexanderkiel alexanderkiel added this to the v0.22.2 milestone Sep 1, 2023
alexanderkiel added a commit that referenced this issue Sep 1, 2023
alexanderkiel added a commit that referenced this issue Sep 1, 2023
@alexanderkiel alexanderkiel changed the title Improve Error Handling on Non-Existing Patient Fix Error Handling on Non-Existing Patient Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:patient-everything
Projects
None yet
Development

No branches or pull requests

1 participant