-
Couldn't load subscription status.
- Fork 209
implement synchronous validation for locally published messages #406
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
Conversation
So that locally published messages are never dropped because of full validation queues.
|
I also temporarily disabled the flaky delivery tag tracer test -- it's getting on my nerves. Follow up issue: #407 |
| // ValidationError is an error that may be signalled from message publication when the message | ||
| // fails validation | ||
| type ValidationError struct { | ||
| Reason string |
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.
Nit: the nice way to do this is to make this "Reason" an error as well and expose it via Cause(). That way, one can check xerrors.Is(error, ValidationError{}) and xerrors.Is(error, UltimateCause{}).
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.
In principle this is indeed quite nice, but it's quite likely unnecessary -- the Reason strings are exported and part of the public API for tracers.
We could add named errors for all of them but this seems more work than what is worth right now.
If you feel strongly about it, let's make an issue to address it.
So that locally published messages are never dropped because of full validation queues.
Closes #398