This commit is contained in:
jamesagnew 2021-04-27 08:43:25 -04:00
parent 348198e7af
commit 00a37deb08
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
type: add
issue: 2384
title: "When a REST server returns a failure because no method matched the request parameters, the
resulting OperationOutcome will now correctly set the issue type to `not-supported`. Thanks
to Jari Maijenburg for the pull request!"

View File

@ -28,6 +28,7 @@ import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.HumanName;
import org.hl7.fhir.dstu3.model.OperationOutcome;
import org.hl7.fhir.dstu3.model.Patient;
import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.AfterAll;
@ -311,6 +312,8 @@ public class SearchDstu3Test {
fail();
} catch (InvalidRequestException e) {
assertThat(e.getMessage(), containsString("Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[Patient/_search] with parameters [[_pretty, foo]]"));
OperationOutcome oo = (OperationOutcome) e.getOperationOutcome();
assertEquals(OperationOutcome.IssueType.NOTSUPPORTED, oo.getIssueFirstRep().getCode());
}
}