File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -620,19 +620,19 @@ async def user_clarification(
620620
621621 # Attach session_id to span if plan_id is available and capture for events
622622 session_id = None
623- memory_store = await DatabaseFactory .get_database (user_id = user_id )
624- if human_feedback .plan_id :
625- try :
626- plan = await memory_store .get_plan_by_plan_id (plan_id = human_feedback .plan_id )
627- if plan and plan .session_id :
628- session_id = plan .session_id
629- span = trace .get_current_span ()
630- if span :
631- span .set_attribute ("session_id" , session_id )
632- except Exception :
633- pass # Don't fail request if span attribute fails
634623
635624 try :
625+ memory_store = await DatabaseFactory .get_database (user_id = user_id )
626+ if human_feedback .plan_id :
627+ try :
628+ plan = await memory_store .get_plan_by_plan_id (plan_id = human_feedback .plan_id )
629+ if plan and plan .session_id :
630+ session_id = plan .session_id
631+ span = trace .get_current_span ()
632+ if span :
633+ span .set_attribute ("session_id" , session_id )
634+ except Exception :
635+ pass # Don't fail request if span attribute fails
636636 user_current_team = await memory_store .get_current_team (user_id = user_id )
637637 team_id = None
638638 if user_current_team :
You can’t perform that action at this time.
0 commit comments