microsoft / microsoft/fhir-server
DELETE search parameter results in "unknown" 500 error
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
**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
Contributor guide
Research direction
Start by reproducing DELETE /SearchParameter/8055acd7-051e-4982-b99e-13ecb7bafc44 against the R4 server using SQL Server, then trace where the empty `unknown` OperationOutcome is produced. The issue names no files or tests; done should mean this deletion returns the appropriate outcome instead of an unexplained 500, with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- backend-api-design, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100