mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
17 lines
404 B
Python
17 lines
404 B
Python
|
|
# api/services/workflow/errors.py
|
||
|
|
from enum import Enum
|
||
|
|
from typing import TypedDict
|
||
|
|
|
||
|
|
|
||
|
|
class ItemKind(str, Enum):
|
||
|
|
node = "node"
|
||
|
|
edge = "edge"
|
||
|
|
workflow = "workflow"
|
||
|
|
|
||
|
|
|
||
|
|
class WorkflowError(TypedDict):
|
||
|
|
kind: ItemKind # "node" | "edge"
|
||
|
|
id: str | None # nodeId or edgeId
|
||
|
|
field: str | None # “data.prompt”, “position.x”, … (optional)
|
||
|
|
message: str # human-readable text
|