microsoft / fhir-server

A service that implements the FHIR standard
MIT License
1.2k stars 515 forks source link

DELETE search parameter results in "unknown" 500 error #3594

Open trevor-webster opened 11 months ago

trevor-webster commented 11 months ago

Describe the bug When attempting to DELETE a search parameter, for example

{
                "resourceType": "SearchParameter",
                "id": "8055acd7-051e-4982-b99e-13ecb7bafc44",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2023-11-07T13:02:52.296+00:00"
                },
                "url": "https://learn.microsoft.com/en-us/azure/healthcare-apis/fhir/how-to-do-custom-search#create-new-search-parameter-for-resource-attributes-with-reference-type",
                "version": "1.0",
                "name": "CompositionSearchParameter",
                "status": "active",
                "description": "Search parameter for Composition by focus",
                "code": "focus",
                "base": [
                    "Composition"
                ],
                "type": "reference",
                "expression": "Composition.section.focus",
                "target": [
                    "Resource"
                ]
            },
            "search": {
                "mode": "match"
            }
        }

DELETE 'http://localhost:8080/SearchParameter/8055acd7-051e-4982-b99e-13ecb7bafc44'

The response is

{
    "resourceType": "OperationOutcome",
    "id": "e1b7f977-4b0d-4437-bb0d-46bd725bd077",
    "meta": {
        "lastUpdated": "2023-11-15T17:17:46.9870796+00:00"
    },
    "issue": [
        {
            "severity": "error",
            "code": "unknown",
            "diagnostics": ""
        }
    ]
}

FHIR Version? R4

Data provider? SQL Server

liamwilson-kainos commented 11 months ago

Also experiencing some weird issues with SearchParameter deletion.

Specifically when i DELETE a resource and then execute a PUT request afterwards (https://github.com/microsoft/fhir-server/issues/3608)

EXPEkesheth commented 11 months ago

#113078- internal reference id