You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Passing a malformed search parameter produces 400 result.
To Reproduce POST http://localhost:5000/fhir/Patient/_search?...=foobar&_format=application/fhir%2Bjson
Result:
{
"resourceType":"OperationOutcome",
"issue":[
{
"severity":"error",
"diagnostics":"Could not parse parameter [(..., foobar)] for reason [Supplied an empty search parameter name or chain (Parameter 'key')]."
},
{
"severity":"error",
"diagnostics":"Exception of type 'Spark.Engine.Core.SparkException' was thrown."
}
]
}
Expected behavior
To return 200 + some operation outcome, like warning, as it's done in https://vonk.fire.ly/:
2.1.1.3 Handling Errors
If a server is unable to execute a search request, it may return an error. A HTTP status code of 403 signifies that the server refused to perform the search, while other 4xx and 5xx codes signify that some sort of error has occurred. When the search fails, a server SHOULD return an OperationOutcome detailing the cause of the failure. Note: An empty search result is not a failure.
In some cases, parameters may cause an error. For instance:
A parameter may refer to a non-existent resource e.g. GET [base]/Observation?subject=101, where "101" does not exist
A parameter may refer to an unknown code e.g. GET [base]/Observation?code=loinc|1234-1, where the LOINC code "1234-1" is not known to the server
A parameter may refer to a time that is out of scope e.g. GET [base]/Condition?onset=le1995, where the system only has data going back to 2001
A parameter may use an illegal or unaaceptable modifier e.g. GET [base]/Condition?onset:text=1995, where the modifier cannot be processed by the server
A data time parameter may have incorrect format e.g. GET [base]/Condition?onset=23%20May%202009
Where the content of the parameter is syntactically correct, servers SHOULD return an error. However where the issue is a logical condition (e.g. unknown subject or code), the server SHOULD process the search, including processing the parameter - with the result of returning an empty search set, since the parameter cannot be satisfied.
In such cases, the search process MAY include an OperationOutcome in the search set that contains additional hints and warnings about the search process. This is included in the search results as an entry with search mode = outcome. Clients can use this information to improve future searches.
Failed tests SprinklerSearchTest (SE25P, SE25G)
The text was updated successfully, but these errors were encountered:
andy-a-o
added a commit
to incendilabs/plan_executor-archive
that referenced
this issue
Nov 30, 2020
Describe the bug
Passing a malformed search parameter produces 400 result.
To Reproduce
POST http://localhost:5000/fhir/Patient/_search?...=foobar&_format=application/fhir%2Bjson
Result:
Expected behavior
To return 200 + some operation outcome, like warning, as it's done in https://vonk.fire.ly/:
Spec says this:
Failed tests
SprinklerSearchTest
(SE25P
,SE25G
)The text was updated successfully, but these errors were encountered: