Added error handling when job fails permanently and failure callback raises an exception