Files
dify/api/services/dify_builder/errors.py
T
Charles YaoandClaude Opus 4.8 7e83264330 refactor: rename Workflow Copilot → Dify Builder
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>
2026-08-23 11:18:35 -07:00

21 lines
846 B
Python

"""Domain errors raised by the Dify Builder's Dify-service adapter.
These sit alongside (not instead of) ``core.dify_builder.errors`` --
they're specific to the OSS ``WorkflowService`` surface the adapter wraps,
so they live in this package rather than the I/O-free ``core`` layer.
"""
class WorkflowNotInitializedError(Exception):
"""Raised when an app has no draft workflow yet (``get_draft_workflow`` returns ``None``)."""
class HashMismatchError(Exception):
"""Domain re-map of ``services.errors.app.WorkflowHashNotEqualError``.
Raised when ``sync_draft_workflow``'s optimistic-concurrency check finds
the draft graph changed since it was last read. The adapter (Task 4)
catches the OSS error and re-raises this instead, so callers only need
to know about ``core``/``services.dify_builder`` error types.
"""