AtlasOfLivingAustralia / galah-R

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

`collect_media()` errors and stops if a thumbnail is missing #215

Closed shandiya closed 5 months ago

shandiya commented 10 months ago

Describe the bug collect_media() errors and stops if thumbnails are missing when full-sized images exist. The error message returned is:

Error in `map()`:■■■■■■■■■■                    45% |  ETA:  3s
ℹ In index: 15.
Caused by error in `req_perform()`:
! HTTP 403 Forbidden.

galah version 2.0.0

To Reproduce

z <- galah_call() |> 
  galah_identify("Candovia aberrata") |>
  galah_filter(year == 2023) |>
  atlas_media()

z_media <- collect_media(z, thumbnail = TRUE)

Expected behaviour Ideally it would be helpful if a default value of NULL or something similar is returned when a thumbnail is missing, and the looping across remaining records continues.

daxkellie commented 6 months ago

Fixed in galah 2.0.1

daxkellie commented 6 months ago

consider whether we can make test for this. might be tough