eventEntryStore.persistSnapshot(type, snapshotEvent, serializedPayload, serializedMetaData);
} catch (RuntimeException exception) {
if (persistenceExceptionResolver != null
&& persistenceExceptionResolver.isDuplicateKeyViolation(exception)) {
//noinspection ConstantConditions
throw new ConcurrencyException(
String.format("A snapshot for aggregate [%s] at sequence: [%s] was already inserted",
snapshotEvent.getAggregateIdentifier(),
snapshotEvent.getSequenceNumber()),
exception
);