Open jfy133 opened 4 years ago
Thanks for this report, @jfy133 :-)
It's an edge-case I forgot to consider, sorry! To do that, the detail
you mentioned should probably be checked, and raise a warning or error, passing along BacDive's detail
.
Note to self: I think this would be a good case to start learning to arrange test-download.R with a mock .Renviron
file, instead of adapting the code to fit the test.
Alternatively, I could read up on the ...
argument. Maybe it could be used to refactor d7a2526`s test-insertion of user & password.
I noticed the following problem: changing your BacDive API password, but (forgetting...) not updating the Renviron file accordingly, results in empty search results in no error.
To reproduce: firstly change your password in the
Renviron
file to an incorrect password.The search result is just a blank line. Assignment and printing of variable displays NULL. No error is displayed.
Updating to the correct password fixed the issue.
I identified that it was an invalid credentials error after I manually copied and pasted relevant functions of the
BacDiveR
source code, and ran the followingThis error does not appear to be passed to the higher level functions.
Additional information:
I have...