Skip to content

Commit

Permalink
actually use warn_on_fail
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Feb 17, 2024
1 parent e8eb4d3 commit d0337f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/current_session.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d0337f9

Please sign in to comment.