added missing precondition check for not publish api