Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Silent exceptions in api/engine.py mask database and value errors

Open eshaanag opened this issue 3 months ago • 0 comments

The current implementation in nettacker/api/engine.py uses broad except Exception blocks that silently swallow failures.

Specifically, at line 388, get_scan_result() failures are caught and returned as a generic 500 error without logging the traceback. Similarly, at line 552, value errors from get_value are silently masked.

I can resolve this by catching narrow exceptions (e.g., ValueError) and using logging.exception() to record the context before returning the HTTP error responses. Please assign this to me.

eshaanag avatar Aug 31 '26 07:08 eshaanag