This commit is contained in:
2026-02-20 04:14:16 +00:00
parent 03292a635c
commit 14ed21a1f9
13 changed files with 492 additions and 1102 deletions

View File

@@ -53,7 +53,9 @@ class QuickReplyContentService:
try:
if not file_path.exists():
logger.warning(f"Quick reply file not found: {file_path}")
raise ValueError(f"Quick reply file not found for screen_id: {screen_id}")
raise ValueError(
f"Quick reply file not found for screen_id: {screen_id}"
)
with open(file_path, "r", encoding="utf-8") as f:
data = json.load(f)
@@ -84,10 +86,14 @@ class QuickReplyContentService:
except json.JSONDecodeError as e:
logger.error(f"Error parsing JSON file {file_path}: {e}", exc_info=True)
raise ValueError(f"Invalid JSON format in quick reply file for screen_id: {screen_id}") from e
raise ValueError(
f"Invalid JSON format in quick reply file for screen_id: {screen_id}"
) from e
except Exception as e:
logger.error(
f"Error loading quick replies for screen {screen_id}: {e}",
exc_info=True,
)
raise ValueError(f"Error loading quick replies for screen_id: {screen_id}") from e
raise ValueError(
f"Error loading quick replies for screen_id: {screen_id}"
) from e