mirror of
https://github.com/laramies/theHarvester.git
synced 2026-08-17 19:35:40 +02:00
Merge pull request #2304 from ChrisJr404/surface-work-item-errors
fix(worker): surface the underlying exception when a work item fails (#2227)
This commit is contained in:
@@ -39,6 +39,6 @@ class TestShodanEngine:
|
||||
assert excinfo.value.code == 0
|
||||
|
||||
out = capsys.readouterr().out
|
||||
assert 'A error occurred while processing a "work item"' not in out
|
||||
assert 'An error occurred while processing a "work item"' not in out
|
||||
assert "a.example.com" in out
|
||||
assert "b.example.com" in out
|
||||
|
||||
@@ -1312,8 +1312,8 @@ async def start(rest_args: argparse.Namespace | None = None):
|
||||
await stor
|
||||
queue.task_done()
|
||||
# Notify the queue that the "work item" has been processed.
|
||||
except Exception:
|
||||
print('\n A error occurred while processing a "work item".\n')
|
||||
except Exception as work_item_error:
|
||||
print(f'\n An error occurred while processing a "work item": {type(work_item_error).__name__}: {work_item_error}\n')
|
||||
queue.task_done()
|
||||
|
||||
async def handler(lst):
|
||||
|
||||
Reference in New Issue
Block a user