mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
Initial commit
This commit is contained in:
7
api/services/errors/__init__.py
Normal file
7
api/services/errors/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
__all__ = [
|
||||
'base', 'conversation', 'message', 'index', 'app_model_config', 'account', 'document', 'dataset',
|
||||
'app', 'completion'
|
||||
]
|
||||
|
||||
from . import *
|
||||
53
api/services/errors/account.py
Normal file
53
api/services/errors/account.py
Normal file
@@ -0,0 +1,53 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class AccountNotFound(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class AccountRegisterError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class AccountLoginError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class AccountNotLinkTenantError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class CurrentPasswordIncorrectError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class LinkAccountIntegrateError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class TenantNotFound(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class AccountAlreadyInTenantError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidActionError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class CannotOperateSelfError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class NoPermissionError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class MemberNotInTenantError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class RoleAlreadyAssignedError(BaseServiceError):
|
||||
pass
|
||||
2
api/services/errors/app.py
Normal file
2
api/services/errors/app.py
Normal file
@@ -0,0 +1,2 @@
|
||||
class MoreLikeThisDisabledError(Exception):
|
||||
pass
|
||||
5
api/services/errors/app_model_config.py
Normal file
5
api/services/errors/app_model_config.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class AppModelConfigBrokenError(BaseServiceError):
|
||||
pass
|
||||
3
api/services/errors/base.py
Normal file
3
api/services/errors/base.py
Normal file
@@ -0,0 +1,3 @@
|
||||
class BaseServiceError(Exception):
|
||||
def __init__(self, description: str = None):
|
||||
self.description = description
|
||||
5
api/services/errors/completion.py
Normal file
5
api/services/errors/completion.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class CompletionStoppedError(BaseServiceError):
|
||||
pass
|
||||
13
api/services/errors/conversation.py
Normal file
13
api/services/errors/conversation.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class LastConversationNotExistsError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class ConversationNotExistsError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class ConversationCompletedError(Exception):
|
||||
pass
|
||||
5
api/services/errors/dataset.py
Normal file
5
api/services/errors/dataset.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class DatasetNameDuplicateError(BaseServiceError):
|
||||
pass
|
||||
5
api/services/errors/document.py
Normal file
5
api/services/errors/document.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class DocumentIndexingError(BaseServiceError):
|
||||
pass
|
||||
5
api/services/errors/file.py
Normal file
5
api/services/errors/file.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class FileNotExistsError(BaseServiceError):
|
||||
pass
|
||||
5
api/services/errors/index.py
Normal file
5
api/services/errors/index.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class IndexNotInitializedError(BaseServiceError):
|
||||
pass
|
||||
17
api/services/errors/message.py
Normal file
17
api/services/errors/message.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
|
||||
class FirstMessageNotExistsError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class LastMessageNotExistsError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class MessageNotExistsError(BaseServiceError):
|
||||
pass
|
||||
|
||||
|
||||
class SuggestedQuestionsAfterAnswerDisabledError(BaseServiceError):
|
||||
pass
|
||||
Reference in New Issue
Block a user