The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
fix: complete exception handling for UpstashRedisEntityStore (#31893)
Michael Li8ef01f8444b9
diff --git a/libs/langchain/langchain/memory/entity.py b/libs/langchain/langchain/memory/entity.pyindex 861857fa2c..6eb922c79c 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 excself.session_id = session_idself.key_prefix = key_prefix