Skip to content

Catching incorrect credentials in getNASA #40

Description

@rdjmacklin

Hello,

Thanks for all the fixes recently! Just wanted to highlight another issue I've found in testing.

If I make a successful call to getNASA with correct credentials:

luna::getNASA(
product = "MCD12Q1",
start = "2010-01-01",
end = "2015-12-31",
aoi = study_area,
download = TRUE,
overwrite = FALSE,
username = "my correct EarthData email",
password = "my correct EarthData password"
)

A following call to getNASA with incorrect credentials will still succeed and not throw the expected error added in response to #38:

luna::getNASA(
product = "MCD12Q1",
start = "2010-01-01",
end = "2015-12-31",
aoi = study_area,
download = TRUE,
overwrite = FALSE,
username = "my incorrect EarthData email",
password = "my correct EarthData password"
)

I am wondering whether the call to httr::config() here in .cmr_download_one is not being overridden (see override = FALSE by default in httr::set_config) in the second call.

Thanks for taking a look!
Rory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions