This commit is contained in:
2025-09-24 11:28:42 +08:00
parent ec1705769c
commit 873c89c778
9 changed files with 100 additions and 39 deletions

View File

@@ -26,7 +26,7 @@ def safe_json_loads(json_str: Union[str, bytes], default: Any = None) -> Any:
try:
return json.loads(json_str)
except (json.JSONDecodeError, TypeError) as e:
logger.warning(f"Failed to parse JSON: {e}, input: {json_str}")
logger.warning(f"Failed to parse JSON: {e}, input: {json_str!r}")
return default or {}