Skip to content

Commit d1fa73e

Browse files
author
stlc-bot
committed
feat(billing): charge for 404s and skip fraud accounting (#1152)
Stainless-Generated-From: f49597a
1 parent 70edd5c commit d1fa73e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Gemfile.lock‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
context.dev (2.17.1)
14+
context.dev (2.18.0)
1515
cgi
1616
connection_pool
1717

‎lib/context_dev/resources/web.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def web_scrape_images(params)
591591
# | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing. A partial result (`finalDOMState: "still-loading"`, only with timeoutOpts.behavior=return-partial) is billed at the base 1 credit with no OCR or actions surcharge |
592592
# | 400 | No | Invalid input, skipped PDF, or the page could not be scraped. error_code WEBSITE_BLOCKED specifically means the site answered with an anti-bot challenge, CAPTCHA wall, or login shell instead of the page (even when the site returned HTTP 200) — retrying later or from another country sometimes succeeds |
593593
# | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
594-
# | 404 | No | Target page returned or fingerprinted as not found |
594+
# | 404 | Yes — 1 credit, or 2 credits with actions | Target page returned or fingerprinted as not found |
595595
# | 408 | No | Request timed out. With timeoutOpts.behavior=return-partial this only happens when nothing usable had rendered by the deadline |
596596
# | 413 | No | Target content exceeds the maximum supported size (20 MB) |
597597
# | 415 | No | Unsupported content type |

‎rbi/context_dev/resources/web.rbi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ module ContextDev
782782
# | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing. A partial result (`finalDOMState: "still-loading"`, only with timeoutOpts.behavior=return-partial) is billed at the base 1 credit with no OCR or actions surcharge |
783783
# | 400 | No | Invalid input, skipped PDF, or the page could not be scraped. error_code WEBSITE_BLOCKED specifically means the site answered with an anti-bot challenge, CAPTCHA wall, or login shell instead of the page (even when the site returned HTTP 200) — retrying later or from another country sometimes succeeds |
784784
# | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
785-
# | 404 | No | Target page returned or fingerprinted as not found |
785+
# | 404 | Yes — 1 credit, or 2 credits with actions | Target page returned or fingerprinted as not found |
786786
# | 408 | No | Request timed out. With timeoutOpts.behavior=return-partial this only happens when nothing usable had rendered by the deadline |
787787
# | 413 | No | Target content exceeds the maximum supported size (20 MB) |
788788
# | 415 | No | Unsupported content type |

0 commit comments

Comments
 (0)