Skip to content

Commit 2accfa7

Browse files
docs: improve text for arge charge for invalid input
1 parent 96ec0ca commit 2accfa7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

sources/platform/actors/publishing/monetize/pay_per_event.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,7 @@ When using browser automation tools like Puppeteer or Playwright for web scrapin
203203

204204
Charge for things like URLs that appear valid but lead to errors (like 404s) since you had to open the page to discover the error. Return error items with proper error codes and messages instead of failing the entire Actor run.
205205

206-
:::info One call vs two calls
207-
208-
The following code snippets show the single call option to both return error item and charge for the work done.
209-
210-
If you prefer to return error item and charge for the work done in two calls, you can use the two calls option where you charge for the work done with `Actor.charge( ... )` and return the error item with `Actor.pushData( ... )`.
211-
212-
:::
206+
The snippet below shows how you can charge for invalid inputs using `Actor.pushData` when a dataset item is created and the `scraped-result` event is charged.
213207

214208
<Tabs groupId="main">
215209
<TabItem value="JavaScript" label="JavaScript">

0 commit comments

Comments
 (0)