diff --git a/tests/discovery/test_shodan_engine.py b/tests/discovery/test_shodan_engine.py index 5c08206d..1b0f0c3d 100644 --- a/tests/discovery/test_shodan_engine.py +++ b/tests/discovery/test_shodan_engine.py @@ -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 diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index 42ac9363..4a60440e 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -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):