mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Fix type-checker error: replace JSONEncodeError with proper exception types
- Use json.JSONDecodeError, TypeError, ValueError instead of non-existent JSONEncodeError - Addresses mypy type-checker failure in CI Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -108,7 +108,7 @@ class SQLiteFlowPersistence(FlowPersistence):
|
||||
json.dumps(state_dict, cls=CrewJSONEncoder),
|
||||
),
|
||||
)
|
||||
except json.JSONEncodeError as e:
|
||||
except (json.JSONDecodeError, TypeError, ValueError) as e:
|
||||
raise RuntimeError(f"Failed to serialize flow state: {str(e)}") from e
|
||||
|
||||
def load_state(self, flow_uuid: str) -> Optional[Dict[str, Any]]:
|
||||
|
||||
Reference in New Issue
Block a user