Affects Version/s: 9.10
Component/s: Events / Works
Some customers needs to handle exception when a given worker failed.
Work exception can very different based on the work type:
- like issues with filesystem
They want for instance listen to an event to triage the document and update its status, or move the document and also send an email.
The current AbstractWork#run simply raise an exception when all retries have failed.
We need a new default event workFailed fired once all retries have failed and attach the stack trace by default. We should also let the custom Work implementation override:
- what is being send in the event so the event can be enrich with more details of the root cause than a simple error massage