From d0337f9eedce0f4a2814e902546dc87450d00435 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Sat, 17 Feb 2024 13:22:35 -0600 Subject: [PATCH] actually use warn_on_fail --- R/current_session.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/current_session.R b/R/current_session.R index cec4d06..f493eae 100644 --- a/R/current_session.R +++ b/R/current_session.R @@ -171,7 +171,8 @@ token_refresh <- function(client_id = pkg.env$keycloak_client_id, warn_on_fail = token <- RETRY("POST", pkg.env$token_url, body = data, encode = "form", quiet = TRUE) if(!token$status_code == 200) { - warning('Unable to refresh SB cloud token. Some functionality may not work.') + if(warn_on_fail) + warning('Unable to refresh SB cloud token. Some functionality may not work.') return(invisible(FALSE)) } else { set_keycloak_env(token)