Description
Describe the bug
When performing a search with more than one _revinclude search parameter and _count set to a largish value (on our server anything 100 or above seems to be enough), the server returns 500 Internal server error. Reproduced in two of our testing environments with different datasets.
The exception in the AI logs states 'The count must be greater than zero.' A stack trace is attached.
FHIR Version?
R4
Data provider?
CosmosDB
To Reproduce
Steps to reproduce the behavior:
- Perform a search as described, for instance /Practitioner/?_count=1000&_revinclude=Contract:subject&_revinclude=Person:practitioner
Expected behavior
The server returns a set of search result, marked as Incomplete if all of the _revinclude data is not present. When only a single _revinclude statement is used, this is the behavior we see.
Actual behavior
The server returns 500 Internal server error