OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
Potential fix for code scanning alert no. 94: Information exposure through an exception
Edwin Josead7780402e9c
diff --git a/src/api/connectors.py b/src/api/connectors.pyindex 8f4f4130b..4c3857e69 100644--- a/src/api/connectors.py+++ b/src/api/connectors.py@@ -1077,7 +1077,8 @@ async def s3_bucket_status(s3 = create_s3_resource(connection.config)all_buckets = [b.name for b in s3.buckets.all()]except Exception as exc:- return JSONResponse({"error": f"Failed to list buckets: {exc}"}, status_code=500)+ logger.exception("Failed to list buckets from S3 for connection %s", connection_id)+ return JSONResponse({"error": "Failed to list buckets"}, status_code=500)# 2. Count indexed documents per bucket from OpenSearchingested_counts: dict = {}