Better diagnostics for ProductNotFound with multiple paths
We had a configuration like this:
path1: [ filt, prod1, prod2 ] path2: [ prod3 ]
Where the producer modules
prod3 depend on the output of
filt rejects an event,
prod2 don't run, but
prod3 still does, and then fails with a
ProductNotFound exception because
prod1 didn't produce its product.
I guess this file can't be a configuration error, because it's possible
prod3 doesn't use
prod1's output, but it could be detected at runtime with a message like:
"prod3 called getByLabel() for 'prod1', but 'prod1' is after filter 'filt'. Call may fail when 'filt' rejects an event".
Perhaps there are situations where
prod3 can be relied upon to do effectively the same filtering internally, in which case the error when the
ProductNotFound exception is thrown could still be improved:
"ProductNotFound: 'prod1' did not run in this Event because 'filt' rejected it".
It otherwise isn't immediately apparent what the problem is, especially when
filt rarely rejects events.
#1 Updated by Christopher Green about 6 years ago
- Tracker changed from Bug to Feature
- Category set to Navigation
- Status changed from New to Accepted
- Estimated time set to 8.00 h
- SSI Package art added
- SSI Package deleted (
We believe we can improve the error message in a way similar to that which you describe. I think we can easily apprise the user that the producer identified as providing the requested product is not present upstream of the requesting module in the same path.