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 error message

Ondra Urban04b938c42535
diff --git a/src/dataset.js b/src/dataset.js
index 920e794fd..ba33421b2 100644
--- a/src/dataset.js
+++ b/src/dataset.js
@@ -42,7 +42,7 @@ export const checkAndSerialize = (item, limitBytes, index) => {
try {
payload = JSON.stringify(item);
} catch (err) {
- throw new Error(`Data item${s}is not serializable to JSON.`);
+ throw new Error(`Data item${s}is not serializable to JSON.\nCause: ${err.message}`);
}
const bytes = Buffer.byteLength(payload);