Closed
Description
Describe the bug
The response status code set in a MethodOutcome
of a Resource provider is not respected.
To Reproduce
- Register the custom Resource provider below:
public class ResponseCodeModifyingPatientProvider implements IResourceProvider {
@Create()
public MethodOutcome createPatient(@ResourceParam Patient thePatient, ServletRequest theServletRequest) {
MethodOutcome methodOutcome = new MethodOutcome();
methodOutcome.setResponseStatusCode(202);
return methodOutcome;
}
@Override
public Class<? extends IBaseResource> getResourceType() {
return Patient.class;
}
}
- Create a
Patient
resource using anIGenericClient
- Inspect the
MethodOutcome
- See that the response status code is 0
Expected behavior
The response status code of the MethodOutcome
should be 202 (i.e. the value set in the custom Resource provider).
Metadata
Metadata
Assignees
Labels
No labels