Catch exception in publish when in masterless.