Use error type instead of using catch all failure::Error in Producer::con
wezm opened this issue · 3 comments
Per the failure guidance the failure::Error
type is typically only recommended when prototyping or for "applications" that won't handle the error. It would be better to define a custom error type and 'derive Fail' for it.
I see there are some parts of the code using a custom error type but others are falling back on Error.
If this sounds reasonable I'm happy to make this change.
For the various methods on Producer
, I completely agree that a custom error type would be useful. For Consumer::run*
it's less clear that the user of the library can do anything useful on error, so I'm less concerned. Happy to take a look at a PR!
I've moved away from using Faktory for my project so don't have a huge personal need to implement this or #9 (comment). However I do need a couple more PRs for Hacktoberfest so might see if I can implement this one.