Skip to content

v1.2.39

Latest

Choose a tag to compare

@scrapely-app scrapely-app released this 29 Oct 22:08
  • A refused charge names the limit that refused it. When a charge is refused or cut short, the platform now says why (HTTP 402 error.data.reason, and limitedBy on a partial acceptance): the run's item limit (maxItems), its maximum total charge (maxTotalChargeUsd) or the account balance. The SDK used to call all of them the spending limit. Now its log lines name the real limit; ChargingManager.getChargeLimitReason() returns 'max-items', 'max-charge' or 'insufficient-funds' and getChargeLimitMessage() the stop message ("Stopped: reached the item limit you set (800 items)", "Stopped: reached the maximum charge you set ($3.00)", "Stopped: your account has no credit left for this run"); and once a limit was reached, a status message (Actor.setStatusMessage, Actor.exit, Actor.fail) whose clause blames the maximum charge gets that clause replaced by the real stop message. Platforms that do not send the reason yet: inferred from the 402 message and ACTOR_MAX_PAID_DATASET_ITEMS. What is charged and saved does not change.