Apify Discord Mirror

Updated 3 months ago

Weird type error

At a glance

The post describes an issue where the maxRequestsPerCrawl property in the PlaywrightCrawlerOptions object is expected to be a number, but it is receiving a string value instead. A community member suggests that process.env.ACTOR_MAX_PAID_DATASET_ITEMS may be returning a string, which could be the cause of the issue. Another community member responds, indicating that the suggestion makes sense.

Useful resources
https://console.apify.com/view/runs/4rGZolVyfYVQesyvO
ArgumentError: Expected property maxRequestsPerCrawl to be of type number but received type string in object PlaywrightCrawlerOptions
Plain Text
maxRequestsPerCrawl: process.env.ACTOR_MAX_PAID_DATASET_ITEMS || input.limit,

Plain Text
typeof crawler.options.maxRequestsPerCrawl
'number'

???
Attachment
image.png
H
T
2 comments
I think that process.env... returns string
Makes sense, thanks!
Add a reply
Sign up and join the conversation on Discord