Unclear docs for `perform/1` callback in case of an unhandled exception, exit or throw
Closed this issue · 1 comments
Hello,
I was attempting to determine what happens with a job when it encounters an exception, specifically whether it will be re-queued and count towards the maximum attempts. However, I was not able to clarify this from the documentation, which states:
In addition to explicit return values, any unhandled exception, exit or throw will fail the job and schedule a retry under the same conditions as in the
{:error, error}
case.
Upon examining the code, it appears that the attempt count is incremented and the job is retried as long as the max_attempts count has not been reached.
If this understanding is correct, may I suggest clarifying the documentation to specifically reference the {:error, error} case, which is very clear?
I have drafted a suggestion regarding this clarification: #1044
Let me know if it sounds good to you!
The linked PR looks good. I'm closing this issue in favor of that PR.