From fe5ae09699e167237b9c39757dc49afb822bc967 Mon Sep 17 00:00:00 2001 From: Nissen <60018847@hospira.corp> Date: Thu, 13 Apr 2017 10:06:20 -0500 Subject: [PATCH] added error message for failed login cookie that is character(0) --- R/login.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/login.R b/R/login.R index d8a5b36..152a287 100644 --- a/R/login.R +++ b/R/login.R @@ -38,10 +38,9 @@ login <- function(email, password, rememberMe=FALSE){ if(is.null(cookie)){ all_cookies <- a$cookies cookie <- all_cookies[grep("^u$", all_cookies$name, ignore.case=F),"value"] - if(is.null(cookie)){ + if(is.null(cookie) | identical(cookie, character(0))){ stop("login failed") } } - return(cookie) }