Closed xeronimus closed 9 years ago
we discuss this tomorrow... I think a command without a name (or a command like "not a json") should really be an error and not a ValidationError ...like tcp packets that are not valid tcp packets... in theory they should be even ignored but I would prefer to throw an error... so the service can log it...
Expected behavior: Domain triggers a "commandRejected" event (behaves similar to an ordinary failed command, e.g. validation, business rule, etc.)
Actual behavior: Domain throws an error: 'Please pass in a command name!'
The problem hereby is: the consumer of the cqrs-domain module has to handle these malformed commands specifically. (Differently to other malformed commands, where "only" some validation rule is violated)
@adrai I'm currently working on a fix for this issue