Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Update setValue stringification error message

Ondra Urbanffda713d3a1d
diff --git a/src/key_value_store.js b/src/key_value_store.js
index 72658dc95..8cdb38b70 100644
--- a/src/key_value_store.js
+++ b/src/key_value_store.js
@@ -85,7 +85,8 @@ export const maybeStringify = (value, options) => {
}
if (value === undefined) {
- throw new Error('The "value" parameter cannot be stringified to JSON.');
+ throw new Error('The "value" parameter was stringified to JSON and returned undefined. '
+ + 'Make sure you\'re not trying to stringify a Function.');
}
}