Coverage for src/dataknobs_llm/exceptions.py: 100%

1"""Custom exceptions for the LLM package.

2

3 This module defines exception types for the LLM package,

4 built on the common exception framework from dataknobs_common.

5"""

6

7 from dataknobs_common import (

8 DataknobsError,

9 OperationError,

10 ResourceError,

11)

12

13# Create LLMError as alias to DataknobsError for backward compatibility

14 LLMError = DataknobsError

15

16

17 class VersioningError(OperationError):

18 """Base exception for versioning-related errors."""

19

20 pass

21

22

23 class RateLimitError(OperationError):

24 """Exception raised when rate limit is exceeded."""

25

26 pass

27

28

29 class StorageError(ResourceError):

30 """Exception raised for storage operation errors."""

31

32 pass

33

34

35 class SchemaVersionError(OperationError):

36 """Exception raised for schema version incompatibilities."""

37

38 pass