mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
Project rename across api/ + web/: modules, symbols, routes (/console/api/dify-builder/*), feature flag (DIFY_BUILDER_ENABLED), Celery queue/tasks, the 7 DB tables (via migration df1b0114de40), and regenerated contract artifacts. Behavior unchanged; 430 tests green, ruff clean. Branch renamed feat/copilot-py-backend → dify-builder. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
23 lines
727 B
Python
23 lines
727 B
Python
"""Dify Builder domain errors.
|
|
|
|
Port of dify-enterprise/server/pkg/enterprise/biz/dify_builder/errors.go. Go
|
|
models these as sentinel ``error`` values (``errors.New(...)``); Python has
|
|
no sentinel-error idiom, so each becomes an ``Exception`` subclass that the
|
|
``Repository``/``Runner`` layers raise and callers catch by type.
|
|
"""
|
|
|
|
|
|
class ConflictError(Exception):
|
|
"""Raised when compare_and_advance loses the version race (stale base_version)."""
|
|
|
|
|
|
class NotFoundError(Exception):
|
|
"""Raised when a session/checkpoint/run does not exist."""
|
|
|
|
|
|
class BusyError(Exception):
|
|
"""Raised when a session already has an Advance in flight.
|
|
|
|
The per-session gate is held, so a concurrent SubmitAction is rejected.
|
|
"""
|