Skip to content

Commit

Permalink
Resolve rate limiting errors in ping_edi()
Browse files Browse the repository at this point in the history
Address HTTP 429 errors triggered by recent updates to the rate limiting
mechanism in the EDI data repository. Currently, these errors manifest
only during the execution of the test suite, specifically within the
ping_edi() function. Remain vigilant as similar issues may arise in other
parts of the codebase in the future, and be prepared to refactor all API
calls to incorporate retry mechanisms.
  • Loading branch information
clnsmth committed Feb 9, 2024
1 parent 695948f commit ebba105
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description: Work with the Ecological Community Data Design Pattern. 'ecocomDP'
repositories, and with methods that keep the derived data up-to-date as the
underlying sources change. Described in O'Brien et al. (2021),
<doi:10.1016/j.ecoinf.2021.101374>.
Version: 1.3.0
Version: 1.3.1
Authors@R:
c(person(given = "Colin",
family = "Smith",
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ecocomDP 1.3.0
# ecocomDP 1.3.1

## Fixes
* Resolved rate limiting errors in ping_edi() triggered by recent updates to the rate limiting mechanism in the EDI data repository and due to the lack of rate limiting procedures in the ecocomDP R package.

# ecocomDP 1.3.0

## Fixes
* Fixed and cleaned up NEON data mapping functions to work with latest NEON data release, return abundance values that are finite and non-negative.
Expand Down
2 changes: 1 addition & 1 deletion R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ parse_delim <- function(x){
# Is the EDI Data Repository accessible?
#
ping_edi <- function() {
r <- httr::GET(url = "https://pasta.lternet.edu/package/eml/edi/759") # Warn if EDI is down
r <- httr::RETRY("GET", url = "https://pasta.lternet.edu/package/eml/edi/759") # Warn if EDI is down
if (httr::status_code(r) != 200) {
stop("The EDI Repository is down for regular maintenance (Wednesday 01:00",
" - 03:00 UTC). If you have reached this message outside maintenance",
Expand Down

0 comments on commit ebba105

Please sign in to comment.