Skip to content

Commit aef6ff1

Browse files
Potential fix for code scanning alert no. 14: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 67c607a commit aef6ff1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/views/search_unified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def get(self, request: Any) -> Response:
381381

382382
except Exception as e:
383383
self.logger.error("unified_search_error", error=str(e), exc_info=True)
384-
return Response({"error": str(e)}, status=500)
384+
return Response({"error": "An internal error has occurred."}, status=500)
385385

386386
def _build_aggregations(
387387
self, results: List[Dict[str, Any]]

0 commit comments

Comments
 (0)