Default command handler


(Ido Shamun) #1

Hi,

Is there any way to set some kind of a default command handler?

I would like to set the behavior of my persistent entity to return invalid command response on every command it gets.

Thanks!


How can I fail all but a few commands with an explicit exception?
(Alan Klikic) #2

Hi @idoshamun,

if command is not handled in the entity behavior, entity will throw:
PersistentEntity.UnhandledCommandException

Br,
Alan


(Ido Shamun) #3

Hi @aklikic,

This is what I ended up using, thanks!