apify-sdk-python
apify-sdk-python copied to clipboard
Improve error handling in `Dataset._get_data_internal()`
Simulate this error in Python and handle it accordingly.
try {
return await this.client.listItems(options);
} catch (e) {
const error = e as Error;
if (error.message.includes('Cannot create a string longer than')) {
throw new Error('dataset.getData(): The response is too large for parsing. You can fix this by lowering the "limit" option.');
}
throw e;
}
https://github.com/apify/apify-sdk-python/blob/v1.3.0/src/apify/storages/dataset.py#L240:L249