Skip to content

Commit

Permalink
check bearer
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed May 9, 2024
1 parent 38bfaaa commit 0619b35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/blackmarbler.R
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ download_raster <- function(file_name,
message(response)
}

if(response$all_headers[[1]]$status != 200){
message("**Error in downloading data; bearer token likely invalid.** Try regenerating the bearer token; please see this link for instructions to obtain a bearer token: https://github.com/worldbank/blackmarbler?tab=readme-ov-file#bearer-token-")
}

}

r <- file_to_raster(download_path,
Expand Down

0 comments on commit 0619b35

Please sign in to comment.