Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions querying a web service should only return a message, never a warning or error #119

Closed
mjwestgate opened this issue Dec 23, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mjwestgate
Copy link
Collaborator

This is advice we received from CRAN that otherwise can cause {galah} to get archived. The easiest way to do this is to use tryCatch to catch all errors (first commit here: e9fffc6); but some care needed to ensure that issues are properly dealt with in downstream code.

@mjwestgate mjwestgate added the bug Something isn't working label Dec 23, 2021
mjwestgate added a commit that referenced this issue Dec 23, 2021
…mprove error handling in `atlas_GET` (#119)

- cached values for `show_all` functions are now stored in `sysdata.rda`
- these are loaded into `galah_internal_cache()` on loading of `galah` (see `onload.R`)
- `show_all` functions that use web services now check `galah_internal_cache()` first
- Internally stored values are used if they've been updated this session OR if the web service can't be reached (the latter with a message)
mjwestgate added a commit that referenced this issue Jan 4, 2022
…RUE)`

- `search_taxa` and `find_taxa` are now in different files, containing only their supporting functions, for easier maintanence
- Both functions support revised behaviour of `atlas_GET` and so do not return errors or warnings resulting from failed web calls (#119)
- Both functions always return a `tibble`; empty if no data are available (#118)
- non-exported functions `intermediate_ranks` and `child_concepts` have been removed
- misc updated tests and fixtures
- deprecated `select_taxa` retains `is_id` for backwards compatability
mjwestgate added a commit that referenced this issue Jan 5, 2022
- `ala_POST` renamed to `atlas_POST`
- error catching added to `ala_download` and `atlas_POST`
 as per `atlas_GET`
- `build_query` now handles empty `tibble`s generated by revised `search_taxa` when web service is down
- `updates to `atlas_occurrences` and `atlas_media` to handle revised behavior of web queries
@mjwestgate
Copy link
Collaborator Author

Updates to atlas_counts given in 461004f
Updates to atlas_taxonomy and atlas_species given in ff046d2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants