rejected

fun rejected(code: String, message: String = code, ref: AggregateRef = required(), violations: List<Violation> = emptyList(), extensions: Map<String, Any?> = emptyMap()): CommandResult

The result of the call when its target refused it with code and message, on ref, naming the fields the command broke (violations) and the rejection's structured extensions: the caller reads them from the CommandRejectedException it gets (CommandRejectedException.violations, CommandRejectedException.error).