add exit code when unable to publish