Description
In django/apps/api/views/audit.py at line 41, a broad except Exception catches all exceptions (including programming errors, database failures, etc.) and returns a generic response.
This silently hides real bugs — any error in the audit query path is swallowed and the client receives a normal-looking response.
Severity
Medium — silent error masking makes debugging difficult and hides real issues.
Location
django/apps/api/views/audit.py:41
Fix
Catch only specific expected exceptions (e.g., ContentType.DoesNotExist, ValueError), and let unexpected exceptions propagate to the error handler.
Description
In
django/apps/api/views/audit.pyat line 41, a broadexcept Exceptioncatches all exceptions (including programming errors, database failures, etc.) and returns a generic response.This silently hides real bugs — any error in the audit query path is swallowed and the client receives a normal-looking response.
Severity
Medium — silent error masking makes debugging difficult and hides real issues.
Location
django/apps/api/views/audit.py:41Fix
Catch only specific expected exceptions (e.g.,
ContentType.DoesNotExist,ValueError), and let unexpected exceptions propagate to the error handler.