- Issue created by @baikho
In our case we have 1,000 URLs and for a subset of these there is no value present in the markup. What we then get is an InvalidArgumentException
with "The current node list is empty" error for every odd URL of the list.
See the Crawler class:
...
public function link(string $method = 'get'): Link
{
if (!$this->nodes) {
throw new \InvalidArgumentException('The current node list is empty.');
}
Have a migrate setup with large sets of URLs, having a few odd rows w/o a value for a XPath selector. The migration will fail on the first error and halt.
I see we're using the same InvalidArgumentException
class as used within Crawler class, but perhaps we could create a different class to distinguish amongst those?
Then we can still halt the migration on faulty usage of the migrate source plugin but are able to catch the Crawler error and emit a warning for the failing URLs.
1. Create a different Exception class for supported filter types within the migrate source plugin
2. Catch and log the Crawler's "The current node list is empty" error but continue migration process
3. Review and test change
N/A
N/A
N/A
Active
1.0
Code