graphiti/graphiti_core/errors.py
Pavlo Paliychuk 8085b52f2a
feat: add error handling for missing nodes and edges, introduce new API endpoints, and update ZepGraphiti class (#104)
* feat: Expose crud operations to service + add graphiti errors

* fix: linter
2024-09-11 12:53:17 -04:00

18 lines
499 B
Python

class GraphitiError(Exception):
"""Base exception class for Graphiti Core."""
class EdgeNotFoundError(GraphitiError):
"""Raised when an edge is not found."""
def __init__(self, uuid: str):
self.message = f'edge {uuid} not found'
super().__init__(self.message)
class NodeNotFoundError(GraphitiError):
"""Raised when a node is not found."""
def __init__(self, uuid: str):
self.message = f'node {uuid} not found'
super().__init__(self.message)