mirror of
https://github.com/langgenius/dify.git
synced 2026-11-12 06:11:12 +08:00
20 lines
581 B
Python
20 lines
581 B
Python
"""Business failures of trace runs; ``code`` names the reason clients and run records show."""
|
|
|
|
|
|
class TraceRunError(Exception):
|
|
def __init__(self, code: str) -> None:
|
|
self.code = code
|
|
super().__init__(code)
|
|
|
|
|
|
class TraceRunNotFoundError(TraceRunError):
|
|
"""The run collected nothing, or a batch names an invocation the run does not have."""
|
|
|
|
|
|
class TraceRunConflictError(TraceRunError):
|
|
"""The operation conflicts with the run's current state."""
|
|
|
|
|
|
class TraceRunLimitError(TraceRunError):
|
|
"""A runtime batch exceeds the run's collection limits."""
|