fix: Edge case and error handling improvements #155
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves error handling and edge case handling across multiple functions.
Changes
H9: view_cansim_webpage NULL check order
tolower()to prevent errors on length-0 inputH8: date_field data context fix
pull(date_field)fallback when sample_date is NAH10: Cache freshness check parameters
list_cansim_cached_tables()M3: warn_only passthrough in retry helpers
warn_onlyparameter through recursive retry calls in bothget_with_timeout_retryandpost_with_timeout_retryM4: Route API calls through retry helpers
get_cansim_table_url: Useget_with_timeout_retry()instead of directhttr::GET()get_cansim_changed_tables: Useget_with_timeout_retry()instead of directhttr::GET()get_cansim_cube_metadata: Usepost_with_timeout_retry()instead of directhttr::POST()M8: NULL/empty vector handling in cache check
!is.null() && length() > 0 && !is.na()M9: Cache write error handling
saveRDS()calls intryCatch()to log warnings on cache write failuresTest plan
devtools::check()passes with 0 errors, 0 warningsRelated Issues
Closes parts of #146 (Edge case crashes)
Addresses #148 (Network reliability improvements)
🤖 Generated with Claude Code