Avoid errors when serializing failed jobs.