diff --git a/eventsourcingdb/src/main/java/io/thenativeweb/eventsourcingdb/Precondition.java b/eventsourcingdb/src/main/java/io/thenativeweb/eventsourcingdb/Precondition.java index 7b76f36..7d18cb7 100644 --- a/eventsourcingdb/src/main/java/io/thenativeweb/eventsourcingdb/Precondition.java +++ b/eventsourcingdb/src/main/java/io/thenativeweb/eventsourcingdb/Precondition.java @@ -2,7 +2,10 @@ /** * A condition that must hold for {@link Client#writeEvents(java.util.List, java.util.List)} to write events. If any of - * the preconditions does not hold, no event is written, and the server answers with status code 409. + * the preconditions does not hold, no event is written, and the client throws a {@link DbApiException} with the code + * {@link ErrorCode#PRECONDITION_VIOLATED}, whichever API the server offers. A recursive precondition needs the v2 API, + * though: against a server without it, the client throws an {@link IncompatibleServerException} instead, and sends no + * write at all (see {@link PreconditionOptions}). */ public sealed interface Precondition permits IsSubjectPristinePrecondition,