fix(publish) return error only if json.stderr || error occurs