Repository navigation
v1.7.2
CRAN compliance: graceful network failure handling
All functions that use internet resources now fail gracefully with an informative message when the service is unavailable, per CRAN policy: "Packages which use Internet resources should fail gracefully with an informative message if the resource is not available or has changed (and not give a check warning nor error)."
Changes
- New
safe_http()helper (R/utils-http.R) — singletryCatchowner for all HTTP calls; connection-level errors (DNS failure, timeout, refused) emitmessage()and returninvisible(NULL)instead of propagating as errors - All 22 HTTP-calling functions updated to use
safe_http()and replacestop()withmessage()for HTTP-level failures - Bug fixes found during code review:
pons_translate():is.vector()→length() > 1(scalar branch was dead code)google_translate()vector path: missingNULLguard addedapertium_translate()vector path:NULL→NA_character_insapplyto preserve character vector typecreate_translation_table()/create_transliteration_table(): handleNULLreturns insidemap_chrtranslate_to_morse(),translate_to_morse_audio(),google_translate_long_text(): were missed in initial pass, now covered
wikipedia_get_language_names()example wrapped in\donttest{}.claudeadded to.Rbuildignore