Importer RowImportFailedException
I've created an importer that is supposed to bail if it encounters references to data that doesn't exist in my database.
However, when I run a test using a CSV with 1 valid row and 1 invalid row, the exception is thrown but the importer then ends up in an infinite loop and I get multiple copies of the valid row imported until I kill the queue.
Here's my
resolveRecord
function that is intended to throw the exception:
The exception gets logged in my laravel.log file, but I do not see any results in the UI for the import.Solution:Jump to solution
Turns out it was a simple solution.
I hadn't included the RowImportFailedException type in the file and so the exception being thrown was actually a class not found exception. I didn't notice that!...
1 Reply
Solution
Turns out it was a simple solution.
I hadn't included the RowImportFailedException type in the file and so the exception being thrown was actually a class not found exception. I didn't notice that!