.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user