Skip to contents

comtrade (development version)

  • Requests to the Comtrade API now time out instead of hanging. httr2 sets no transfer timeout, so a server that accepted the connection and then stopped sending stalled the session indefinitely. Every request now aborts if the connection takes over 20 seconds to open or the transfer moves under 1 byte per second for 60 seconds, and surfaces as the usual “Failed to connect to the Comtrade API” error. Set options(comtrade.timeout = <seconds>) for a hard cap on the whole request.

comtrade 0.1.1

CRAN release: 2026-09-09

  • Fixed the donttest check ERROR reported for 0.1.0 on CRAN’s additional issues page. ct_request() called httr2::resp_body_json() on any response that was not an HTTP error, but the Comtrade API can return 2xx with an empty body and no content type. Parsing then failed inside httr2 with Unexpected content type "NA", which is neither actionable for the caller nor survivable in an example. The response content type is now checked before parsing, and both the check and the parse raise an informative error naming the likely cause.

  • Network-dependent examples now wrap their calls in tryCatch() and guard on the result, so a rate-limited or unavailable API degrades the example gracefully instead of failing R CMD check --run-donttest.

  • Expanded all acronyms in DESCRIPTION (HS, SITC, BEC, EBOPS, API) per CRAN reviewer feedback.

comtrade 0.1.0

CRAN release: 2026-04-13