sboysel / fredr

An R client for the Federal Reserve Economic Data (FRED) API
https://sboysel.github.io/fredr/
Other
92 stars 21 forks source link

Retry #70

Closed DavisVaughan closed 5 years ago

DavisVaughan commented 5 years ago

@sboysel do you care if I merge this in? It just adds a retry to the core functionality, retrying 10 times if anything fails. This helps because fred's api seems to be fairly finicky. Even with 10 retries I can't consistently get all tests to pass (some are far more finicky than others), but this helps interactive use for sure.

You can focus on this line, the rest is roxygen2 redocumenting things in a slightly different way since it was updated: https://github.com/sboysel/fredr/compare/retry?expand=1#diff-2eb905d49bb8a6719a6334b2a1b87a73R60

sboysel commented 5 years ago

Looks great, thanks for taking some time to look into that error. Just a thought, but what would you think about exposing the times arg in all functions? Overkill?

sboysel commented 5 years ago

@DavisVaughan ended up merging your solution to master as is. Thanks!