mirror of
https://github.com/langgenius/dify.git
synced 2026-11-23 11:43:56 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
34 lines
1012 B
Python
34 lines
1012 B
Python
"""Application errors of Console workflow comments, raised by the service and its adapters."""
|
|
|
|
|
|
class WorkflowCommentError(Exception):
|
|
"""Base class for framework-neutral workflow comment failures."""
|
|
|
|
|
|
class WorkflowCommentAppNotFoundError(WorkflowCommentError):
|
|
def __init__(self) -> None:
|
|
super().__init__("App not found")
|
|
|
|
|
|
class WorkflowCommentNotFoundError(WorkflowCommentError):
|
|
def __init__(self) -> None:
|
|
super().__init__("Comment not found")
|
|
|
|
|
|
class WorkflowCommentReplyNotFoundError(WorkflowCommentError):
|
|
def __init__(self) -> None:
|
|
super().__init__("Reply not found")
|
|
|
|
|
|
class WorkflowCommentPermissionError(WorkflowCommentError):
|
|
"""Raised when an account edits or deletes a comment or reply it did not create."""
|
|
|
|
|
|
class InvalidWorkflowCommentContentError(WorkflowCommentError):
|
|
pass
|
|
|
|
|
|
class InvalidMentionedUserIdError(WorkflowCommentError):
|
|
def __init__(self, user_id: str) -> None:
|
|
super().__init__(f"{user_id} is not a valid uuid.")
|