Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Messenger] DeprecateHandleTrait in favor of a newSingleHandlingTrait#52952
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ff7e5f4 to574c4eaCompareHandleTrait in favor of the newSingleHandlingTraitHandleTrait in favor of a newSingleHandlingTraitb587f76 to48a75e3CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| /** | ||
| * Dispatches the given message, expecting to be handled by a single handler | ||
| * and returns the result from the handler returned value. | ||
| * This behavior is useful for both synchronous command & query buses, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
fact is we're querying for a value, hence i prefer namingQueryBusTrait::query, but not a blocker :)
MatTheCatDec 21, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don’t want this trait’s name to imply a single use-case as there can be many (a command bus returning IDs e.g.).
EDIT: heh, just found#29167 (comment) 😁
48a75e3 toc19ecdaComparec19ecda toda5c907Comparechalasr commentedDec 21, 2023
The value brought by this change doesn't seem worth the cost of deprecating HandleTrait entirely to me. Also the name |
MatTheCat commentedFeb 2, 2024
Changing for a more explicit name and handling exceptions correctly felt enough for me, but will close then. |
Uh oh!
There was an error while loading.Please reload this page.
In competition with#52949
When usingthe
HandleTrait, theHandlerFailedExceptionjust adds noise as the wrapped exception is the one we would expect to be thrown.This PR aims to replace the
HandleTraitby a newSingleHandlingTrait, the latter throwing any single exception wrapped in aHandlerFailedException. In addition, it checks for a single handler even if one failed.