diff --git a/libs/langchain/langchain/memory/entity.py b/libs/langchain/langchain/memory/entity.py index 861857fa2c9..6eb922c79c0 100644 --- a/libs/langchain/langchain/memory/entity.py +++ b/libs/langchain/langchain/memory/entity.py @@ -126,8 +126,10 @@ class UpstashRedisEntityStore(BaseEntityStore): try: self.redis_client = Redis(url=url, token=token) - except Exception: - logger.error("Upstash Redis instance could not be initiated.") + except Exception as exc: + error_msg = "Upstash Redis instance could not be initiated" + logger.error(error_msg) + raise RuntimeError(error_msg) from exc self.session_id = session_id self.key_prefix = key_prefix