Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor command handling #4

Open
sylvaindesve opened this issue Dec 9, 2019 · 0 comments
Open

Refactor command handling #4

sylvaindesve opened this issue Dec 9, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@sylvaindesve
Copy link
Owner

  • Keep command handlers simple and let them throw errors :
    • TodoDomainError for domain rules (e.g. a non-empty list cannot be archived)
    • TodoCommandError for command flow (e.g. unknown list ID)
  • Decorate CommandBus to catch error and encapsulate error messages in Notification
@sylvaindesve sylvaindesve added the enhancement New feature or request label Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant