provide way to resolve 429 for the Netherlands#166
Conversation
|
Here is a example of the new error message: devtools::load_all("~/getRad")
#> ℹ Loading getRad
withr::local_options(list(
"keyring_backend" = "env"
))
# get public key here https://developer.dataplatform.knmi.nl/open-data-api#token
withr::local_envvar(
list(
"getRad_nl_api_key" = "eyJvcmciOiI1ZTU1NGUxOTI3NGE5NjAwMDEyYTNlYjEiLCJpZCI6ImVlNDFjMWI0MjlkODQ2MThiNWI4ZDViZDAyMTM2YTM3IiwiaCI6Im11cm11cjEyOCJ9"
)
)
get_pvol(
"nlhrw",
time <- as.POSIXct("2024-4-4 20:00:00", tz = "Europe/Helsinki"),
param = "all"
)
#> Waiting 2s for retry backoff ■■■■■■■■■■■■■■■
#> Waiting 2s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 3s for retry backoff ■■■■■■■■■■■■■
#> Waiting 3s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Error in `get_pvol()`:
#> ! There was a rate limitation error (HTTP 429) while getting data from
#> the Netherlands.
#> ℹ This frequently occurs when using the anonymous key, if it occurs repeatedly
#> consider requesting a registered key
#> (<https://developer.dataplatform.knmi.nl/open-data-api#token>).
#> ℹ You can check the current value of "nl_api_key" with
#> `get_secret("nl_api_key")`. |
…t in regular checks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
- Coverage 93.72% 93.16% -0.57%
==========================================
Files 24 24
Lines 1801 1814 +13
==========================================
+ Hits 1688 1690 +2
- Misses 113 124 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I'm not sure if we can test this easily, given it requires a specific server sided response that we cant trigger reliably. |
No description provided.