Fix #1163 - Correctly handle invalid CapabilityStatement

This commit is contained in:
James Agnew 2019-01-11 08:01:20 -07:00
parent dec53c1eea
commit fc09ed6966
3 changed files with 1164 additions and 1134 deletions

View File

@ -301,7 +301,7 @@ public abstract class RestfulClientFactory implements IRestfulClientFactory {
conformance = (IBaseResource) client.fetchConformance().ofType(implementingClass).execute();
} catch (FhirClientConnectionException e) {
if (!myContext.getVersion().getVersion().isOlderThan(FhirVersionEnum.DSTU3) && e.getCause() instanceof DataFormatException) {
capabilityStatementResourceName = "Conformance";
capabilityStatementResourceName = "CapabilityStatement";
implementingClass = myContext.getResourceDefinition(capabilityStatementResourceName).getImplementingClass();
conformance = (IBaseResource) client.fetchConformance().ofType(implementingClass).execute();
} else {

View File

@ -283,6 +283,12 @@
AuthorizationInterceptor could not authorize these requests if it was depending on
headers being present.
</action>
<action type="fix">
When using a client in DSTU3/R4 mode, if the client attempted to validate the server
CapabilityStatement but was not able to parse the response, the client would throw
an exception with a misleading error about the Conformance resource not existing. This
has been corrected. Thanks to Shayaan Munshi for reporting and providing a test case!
</action>
</release>
<release version="3.6.0" date="2018-11-12" description="Food">
<action type="add">