AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
38 stars 3 forks source link

Returning empty tibbles if email is not authenticated with no clear warning/error #173

Closed jscamac closed 7 months ago

jscamac commented 1 year ago

Describe the bug galah doesn't provide adequate warning when attempting to download occurrence records with an email address that hasn't been authenticated by ALA.

galah version ‘1.5.0’

To Reproduce

galah_config(email = "fake@gmail.com")
galah_call() %>%
  galah_identify("Grevillea australis") %>%
  atlas_occurrences()

Returns

This query will return 2459 records
Checking queue
Current queue size: 
Running query on selected atlas
  |============================================================================================================================================| 100%
Calling the API failed for `atlas_occurrences`
# A tibble: 0 × 0

Expected behaviour What it should do is either provide a more explicit error saying the email address is not valid, or if it the email is optional, return the tibble of 2459 occurrence records. Otherwise there is the possibility that a user will assume there are no records for the species (despite the message suggesting the API failed).

mjwestgate commented 7 months ago

Fixed as of version 2.0