use of org.hl7.fhir.r4.model.Media in project nia-patient-switching-standard-adaptor by NHSDigital.
the class OperationOutcomeExceptionHandler method handleHttpMediaTypeNotSupported.
@Override
protected ResponseEntity<Object> handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex, HttpHeaders requestHeaders, HttpStatus status, WebRequest request) {
CodeableConcept details = CodeableConceptUtils.createCodeableConcept("UNSUPPORTED_MEDIA_TYPE", ISSUE_SYSTEM, "Unsupported media " + "type", null);
OperationOutcome operationOutcome = createOperationOutcome(NOTSUPPORTED, ERROR, details, ex.getMessage());
return errorResponse(requestHeaders, status, operationOutcome);
}
Aggregations