Add job to on_error handler if the handler has a 4th argument

I don't see any tests that cover this functionality in the first place, so it's kind of difficult to add tests... any ideas? Otherwise I'd like to use this!