Skip to content

provide way to resolve 429 for the Netherlands#166

Merged
bart1 merged 10 commits intomainfrom
165-getting-dutch-radar-date-frequently-fails-with-429
Jan 15, 2026
Merged

provide way to resolve 429 for the Netherlands#166
bart1 merged 10 commits intomainfrom
165-getting-dutch-radar-date-frequently-fails-with-429

Conversation

@bart1
Copy link
Copy Markdown
Collaborator

@bart1 bart1 commented Jan 13, 2026

No description provided.

@bart1
Copy link
Copy Markdown
Collaborator Author

bart1 commented Jan 14, 2026

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")`.

@bart1 bart1 marked this pull request as ready for review January 14, 2026 10:58
@bart1 bart1 requested review from PietrH and barthoekstra January 14, 2026 10:58
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.16%. Comparing base (70bea5f) to head (3937ee6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
R/get_pvol_nl.R 15.38% 11 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bart1
Copy link
Copy Markdown
Collaborator Author

bart1 commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review. ✅ Project coverage is 93.16%. Comparing base (70bea5f) to head (3c408e7).
Files with missing lines Patch % Lines
R/get_pvol_nl.R 15.38% 11 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:

* ❄️ [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.

I'm not sure if we can test this easily, given it requires a specific server sided response that we cant trigger reliably.

@bart1 bart1 merged commit 4b6a386 into main Jan 15, 2026
8 of 11 checks passed
@bart1 bart1 deleted the 165-getting-dutch-radar-date-frequently-fails-with-429 branch January 15, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting dutch radar date frequently fails with 429

2 participants