Assign the error object to the job on failure