Skip to content

pydantic_graph.exceptions

GraphSetupError

Bases: TypeError

Error caused by an incorrectly configured graph.

Source code in pydantic_graph/pydantic_graph/exceptions.py
1
2
3
4
5
6
7
8
9
class GraphSetupError(TypeError):
    """Error caused by an incorrectly configured graph."""

    message: str
    """Description of the mistake."""

    def __init__(self, message: str):
        self.message = message
        super().__init__(message)

message instance-attribute

message: str = message

Description of the mistake.

GraphBuildingError

Bases: ValueError

An error raised during graph-building.

Source code in pydantic_graph/pydantic_graph/exceptions.py
12
13
14
15
16
17
18
19
20
class GraphBuildingError(ValueError):
    """An error raised during graph-building."""

    message: str
    """The error message."""

    def __init__(self, message: str):
        self.message = message
        super().__init__(message)

message instance-attribute

message: str = message

The error message.

GraphValidationError

Bases: ValueError

An error raised during graph validation.

Source code in pydantic_graph/pydantic_graph/exceptions.py
23
24
25
26
27
28
29
30
31
class GraphValidationError(ValueError):
    """An error raised during graph validation."""

    message: str
    """The error message."""

    def __init__(self, message: str):
        self.message = message
        super().__init__(message)

message instance-attribute

message: str = message

The error message.

GraphRuntimeError

Bases: RuntimeError

Error caused by an issue during graph execution.

Source code in pydantic_graph/pydantic_graph/exceptions.py
34
35
36
37
38
39
40
41
42
class GraphRuntimeError(RuntimeError):
    """Error caused by an issue during graph execution."""

    message: str
    """The error message."""

    def __init__(self, message: str):
        self.message = message
        super().__init__(message)

message instance-attribute

message: str = message

The error message.