Skip to content

Commit 0b31416

Browse files
updated logging changes
1 parent 8f12f49 commit 0b31416

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

content-gen/src/backend/app.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,10 @@ async def set_conversation_context():
8181

8282
# 1. Extract from JSON body (POST requests)
8383
if request.content_type and "json" in request.content_type:
84-
try:
85-
data = await request.get_json()
86-
if data and isinstance(data, dict):
87-
conversation_id = data.get("conversation_id", "")
88-
user_id = data.get("user_id", "")
89-
except Exception:
90-
pass
84+
data = await request.get_json(silent=True)
85+
if data and isinstance(data, dict):
86+
conversation_id = data.get("conversation_id", "")
87+
user_id = data.get("user_id", "")
9188

9289
# 2. Extract from URL path parameters (e.g. /api/conversations/<conversation_id>)
9390
if not conversation_id and request.view_args:

0 commit comments

Comments
 (0)