public class PlatformDataIntegrityExceptionMapper implements ExceptionMapper<PlatformDataIntegrityException> {
@Override
public Response toResponse(final PlatformDataIntegrityException exception) {
final ApiGlobalErrorResponse dataIntegrityError = ApiGlobalErrorResponse.dataIntegrityError(
exception.getGlobalisationMessageCode(), exception.getDefaultUserMessage(), exception.getParameterName(),
exception.getDefaultUserMessageArgs());
return Response.status(Status.FORBIDDEN).entity(dataIntegrityError).type(MediaType.APPLICATION_JSON).build();
}