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

PatchResourceHandler doesn't pass through client supplied weak Etag #2877

Closed
brendankowitz opened this issue Oct 12, 2022 · 0 comments
Closed
Labels
Bug Bug bug bug.

Comments

@brendankowitz
Copy link
Member

brendankowitz commented Oct 12, 2022

Describe the bug

PatchResourceHandler doesn't pass through client supplied weak Etag

return await _mediator.Send<UpsertResourceResponse>(new UpsertResourceRequest(patchedResource), cancellationToken);

Should be:

return await _mediator.Send<UpsertResourceResponse>(new UpsertResourceRequest(patchedResource, request.WeakETag), cancellationToken);

FHIR Version?
Stu3/R4/R5

Data provider?
CosmosDB/SQL Server

To Reproduce
Steps to reproduce the behavior:

  1. Turn on "versioned-update" setting
  2. Create a resource
  3. Try to update this resource using PATCH and supplying the If-Match header

Expected behavior
Resource is updated

Actual behavior

Error is returned.

{
  "resourceType": "OperationOutcome",
  "id": "d244e9d8-877b-4e47-8561-db9d2576a7e7",
  "meta": {
    "lastUpdated": "2022-10-12T22:43:04.8241419+00:00"
  },
  "issue": [
    {
      "severity": "error",
      "code": "invalid",
      "diagnostics": "A valid if-match header is required for resource type 'Patient'."
    }
  ]
}

AB#96468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug bug bug.
Projects
None yet
Development

No branches or pull requests

1 participant