in src/main/java/software/amazon/event/kafkaconnector/EventBridgeResult.java [105:109]
public MappedSinkRecord<Error> failure() {
if (isSuccess())
throw new IllegalStateException("Result is a success and cannot be accessed as failure.");
return ((Failure) value).value;
}