How to mark job as failed
projuljustin opened this issue · 2 comments
Is there a proper way to mark a job as failed to be retried?
Under certain circumstances I want the job to fail, then I reprocess it later. The main place I do this is during a photo upload. Currently I'm doing this by throwing a new error in the upload error listener, which is caught in my try, catch. However if I don't throw an error in the catch statement, the job succeeds and is not retried. I added a throw error to the catch, but this crashes the app it seems. Maybe I'm just not thinking this through, but I figured it wouldn't hurt to ask.
Can you provide a code example?
I would use the rethrowing approach or if you don't do any further handling just don't catch it.
Chased that issue for several hours, ended up being a copy paste error. My apologies, need more coffee I guess :)