Add global --timeout flag for per-request timeout#32
Open
paulius-krutkis-dcd wants to merge 3 commits into
Open
Add global --timeout flag for per-request timeout#32paulius-krutkis-dcd wants to merge 3 commits into
paulius-krutkis-dcd wants to merge 3 commits into
Conversation
0214f87 to
52fd722
Compare
7e91d23 to
bc4e674
Compare
Expose the SDK's request timeout as a global --timeout <ms> flag (default 180000, the SDK default). Applies to every command and to each item in a batch run; a timed-out request surfaces as TimeoutError (exit 6) and, in batch mode, as a per-item error record without aborting the run. Invalid values are rejected as a usage error (exit 2).
52fd722 to
6828b51
Compare
- Bump @decodo/sdk-ts ^2.1.1 → ^2.1.2
- Pass integrationHeader: INTEGRATION_HEADER ("cli") to DecodoClient
- Remove TODO(SCR-3150) comment — SDK now supports integrationHeader
- Update auth-validation test to expect x-integration: cli
Co-Authored-By: Oz <oz-agent@warp.dev>
This reverts commit a192b63.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a global
--timeout <ms>flag exposing the SDK's per-request timeout (default 180000, the SDK default).TimeoutError→ exit 6; in batch mode it becomes a per-item error record without aborting the run.Threaded through
createDecodoClient(token, schema, timeoutMs)and read from the root options in both the single and batch scrape paths.Note on retries (deliberately not added)
--max-retrieswas considered and left out. scraper-api already retries the actual scrape against the target inside a single billed request (e.g.unblocker-serviceretries on content-not-found; the SDK itself does not retry and maps 429→RateLimitErrordirectly). Client-side retries would only add transport-level resilience (429/5xx/network) while risking duplicate billing, so they're deferred.--timeouthas no such downside.