Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

Potential fix for code scanning alert no. 89: Information exposure through an exception

Edwin Josea322b44f7d4f
diff --git a/src/api/connectors.py b/src/api/connectors.py
index 4c3857e69..d22e0f7da 100644
--- a/src/api/connectors.py
+++ b/src/api/connectors.py
@@ -795,8 +795,9 @@ async def ibm_cos_configure(
cos = create_ibm_cos_client(conn_config)
cos.list_buckets()
except Exception as exc:
+ logger.exception("Failed to connect to IBM COS during credential test.")
return JSONResponse(
- {"error": f"Could not connect to IBM COS: {exc}"},
+ {"error": "Could not connect to IBM COS with the provided configuration."},
status_code=400,
)