Raise errors when import items fail

This should make is way easier to debug
This commit is contained in:
Mouse Reeve 2021-11-12 15:17:01 -08:00
parent b784dcdb46
commit 6a5a598345

View file

@ -123,10 +123,9 @@ def import_item_task(source, item_id):
try: try:
item.resolve() item.resolve()
except Exception as err: # pylint: disable=broad-except except Exception as err: # pylint: disable=broad-except
logger.exception(err)
item.fail_reason = _("Error loading book") item.fail_reason = _("Error loading book")
item.save() item.save()
return raise err
if item.book: if item.book:
job = item.job job = item.job