Stream: dotnet
Topic: Pagination exception
Santosh Jami (Oct 05 2017 at 14:21):
I am using Spark / DSTU2
I am trying to retrive all the Patients in the server. Here us what I am doing:
FhirClient client = new FhirClient(testEndpoint);
Bundle patientSearchBundle = client.Search<Patient>(); //This works fine, I get 20 entries
var newBundle = client.Continue(patientSearchBundle); // this throws an exception
When I point with the same code to the reference servers, it works fine:
http://spark-dstu2.furore.com/fhir/Patient
http://spark.furore.com/fhir/_snapshot?id=c8d30c4b-b737-421b-a115-548b54aab55b&start=20
When I point to my local server, the exception happens:
"Operation was unsuccessful, and returned status InternalServerError. OperationOutcome: Overall result: FAILURE (1 errors and 0 warnings)\r\n\r\n[ERROR] (no details)(further diagnostics: Endpoint returned a body with contentType 'text/html', while a valid FHIR xml/json body type was expected. Is this a FHIR endpoint?)\r\n"
http://localhost:8091/fhir/Patient //this is good
http://localhost:8091/spark/fhir/_snapshot?id=798e7ba1-5059-42de-913a-22ce9c501369&start=20
--this throws an error.
Server Error in '/' Application.
Value cannot be null.
Parameter name: typeRequested
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: typeRequested
Source Error:
Line 25: try
Line 26: {
Line 27: result = (IController)(_container.Resolve(controllerType));
Line 28: }
Line 29: catch (ResolutionFailedException)
Source File: C:\Users\SANTOSH\Source\Repos\spark-master\spark-master\src\Spark\App_Start\UnityControllerFactory.cs Line: 27
Santosh Jami (Oct 05 2017 at 17:30):
As I am not seeing any exceptions against the Spark reference server, and am getting errors on my local server, it seems both might have different versions. Spark reference server has the code from master branch of: https://github.com/furore-fhir/spark/? Can someone please confirm?
Santosh Jami (Oct 06 2017 at 17:53):
I hosted my Spark from dstu2/master branch instead of master branch. It fixed the issue. I decided to start migration to Vonk earlier than planned :)
Last updated: Apr 12 2022 at 19:14 UTC