File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -769,17 +769,17 @@ validate_api_request <- function(res, call = caller_env()) {
769769 # if any error details exist.
770770 if (length(error_details ) > 0 ) {
771771 error_details <- c(" x" = " Invalid IPUMS registration" , error_details )
772+ } else {
773+ # Otherwise we should be dealing with a valid registration but invalid key
774+ error_details <- c(
775+ " x" = " The provided API key is either missing or invalid." ,
776+ " i" = paste0(
777+ " Please provide your API key to the `api_key` argument " ,
778+ " or request a key at https://account.ipums.org/api_keys"
779+ ),
780+ " i" = " Use `set_ipums_api_key()` to save your key for future use."
781+ )
772782 }
773-
774- # Otherwise we should be dealing with a valid registration but invalid key
775- error_details <- c(
776- " x" = " The provided API key is either missing or invalid." ,
777- " i" = paste0(
778- " Please provide your API key to the `api_key` argument " ,
779- " or request a key at https://account.ipums.org/api_keys"
780- ),
781- " i" = " Use `set_ipums_api_key()` to save your key for future use."
782- )
783783 }
784784
785785 # If a downloads request, add hint to inform of possible issue
You can’t perform that action at this time.
0 commit comments