Exceptions from Aggregate constructors causes warning logs

When validating commands in an aggregates constructor, I throw exceptions indicating that the command was rejected.
Everything works great, but I see that the implementation of AbstractRepository
is logging warnings: Exception occurred while trying to create an aggregate.

At this point, I started questioning if I am doing something wrong.
Shouldn’t the aggregate validate the commands during construction?
Seems like, either this is a pretty common use case and warnings shouldn’t be issued.
Or, that I am doing something wrong.
Id be happy if anyone can shed some light on this.
Thanks!

Hi Daniel,

You’re correct in validating the command in your command handling constructor - an exception might be generated by you (if validation fails) or the framework.