Skip to content

Commit a85697c

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ def trigger_rebuild():
159159
try:
160160
app.rag_system.rebuild()
161161
except Exception as e:
162-
print(f"Error rebuilding embeddings: {str(e)}")
162+
logging.error(f"Error rebuilding embeddings: {str(e)}")
163163
return jsonify(
164-
{"error": "Error rebuilding embeddings", "details": str(e)}
164+
{"error": "Error rebuilding embeddings"}
165165
), 500
166166

167167
print("Finished rebuilding embeddings.")

0 commit comments

Comments
 (0)