dkan icon indicating copy to clipboard operation
dkan copied to clipboard

Allow \Harvest\Harvester to log errors for users and devs

Open paul-m opened this issue 2 years ago • 0 comments

User Story

This issue supports WCMS-10613.

This issue is almost a bug report, but the code currently works. It's just not easy to determine what went wrong in a failed content import.

Trying to perform the Drush commands for import from sample_content module, I get a status like this:

% ddev drush dkan:sample-content:create
+----------------+-----------+---------+---------+--------+
| run_id         | processed | created | updated | errors |
+----------------+-----------+---------+---------+--------+
| sample_content | 10        | 0       | 0       | 10     |
+----------------+-----------+---------+---------+--------+

Unfortunately the errors are only counted and not logged, so there is no path forward.

This effort should probably focus on \Harvest\Harvester::extract(), ::transform(), and ::load(), which catch exceptions and store their error outputs in an array, which is subsequently discarded.

Acceptance Criteria

Attempting to perform a harvest results in error logs for errors that occur.

paul-m avatar Jul 29 '22 17:07 paul-m