mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-21 12:46:10 +00:00
Credit for #2384
This commit is contained in:
parent
348198e7af
commit
00a37deb08
@ -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!"
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user