mirror of
https://github.com/langgenius/dify.git
synced 2026-04-30 07:28:05 +08:00
Merge branch 'fix/chore-fix' into dev/plugin-deploy
This commit is contained in:
@ -9,33 +9,41 @@ class PluginDaemonError(Exception):
|
||||
return f"{self.__class__.__name__}: {self.description}"
|
||||
|
||||
|
||||
class PluginDaemonInternalServerError(PluginDaemonError):
|
||||
class PluginDaemonInternalError(PluginDaemonError):
|
||||
pass
|
||||
|
||||
|
||||
class PluginDaemonClientSideError(PluginDaemonError):
|
||||
pass
|
||||
|
||||
|
||||
class PluginDaemonInternalServerError(PluginDaemonInternalError):
|
||||
description: str = "Internal Server Error"
|
||||
|
||||
|
||||
class PluginDaemonBadRequestError(PluginDaemonError):
|
||||
description: str = "Bad Request"
|
||||
|
||||
|
||||
class PluginDaemonNotFoundError(PluginDaemonError):
|
||||
description: str = "Not Found"
|
||||
|
||||
|
||||
class PluginInvokeError(PluginDaemonError):
|
||||
description: str = "Invoke Error"
|
||||
|
||||
|
||||
class PluginUniqueIdentifierError(PluginDaemonError):
|
||||
description: str = "Unique Identifier Error"
|
||||
|
||||
|
||||
class PluginNotFoundError(PluginDaemonError):
|
||||
description: str = "Plugin Not Found"
|
||||
|
||||
|
||||
class PluginDaemonUnauthorizedError(PluginDaemonError):
|
||||
class PluginDaemonUnauthorizedError(PluginDaemonInternalError):
|
||||
description: str = "Unauthorized"
|
||||
|
||||
|
||||
class PluginPermissionDeniedError(PluginDaemonError):
|
||||
class PluginDaemonNotFoundError(PluginDaemonInternalError):
|
||||
description: str = "Not Found"
|
||||
|
||||
|
||||
class PluginDaemonBadRequestError(PluginDaemonClientSideError):
|
||||
description: str = "Bad Request"
|
||||
|
||||
|
||||
class PluginInvokeError(PluginDaemonClientSideError):
|
||||
description: str = "Invoke Error"
|
||||
|
||||
|
||||
class PluginUniqueIdentifierError(PluginDaemonClientSideError):
|
||||
description: str = "Unique Identifier Error"
|
||||
|
||||
|
||||
class PluginNotFoundError(PluginDaemonClientSideError):
|
||||
description: str = "Plugin Not Found"
|
||||
|
||||
|
||||
class PluginPermissionDeniedError(PluginDaemonClientSideError):
|
||||
description: str = "Permission Denied"
|
||||
|
||||
@ -7,7 +7,7 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from core.callback_handler.workflow_tool_callback_handler import DifyWorkflowCallbackHandler
|
||||
from core.file import File, FileTransferMethod, FileType
|
||||
from core.plugin.manager.exc import PluginInvokeError
|
||||
from core.plugin.manager.exc import PluginDaemonClientSideError
|
||||
from core.tools.entities.tool_entities import ToolInvokeMessage, ToolParameter
|
||||
from core.tools.tool_engine import ToolEngine
|
||||
from core.tools.tool_manager import ToolManager
|
||||
@ -105,7 +105,7 @@ class ToolNode(BaseNode[ToolNodeData]):
|
||||
try:
|
||||
# convert tool messages
|
||||
yield from self._transform_message(message_stream, tool_info, parameters_for_log)
|
||||
except PluginInvokeError as e:
|
||||
except PluginDaemonClientSideError as e:
|
||||
yield RunCompletedEvent(
|
||||
run_result=NodeRunResult(
|
||||
status=WorkflowNodeExecutionStatus.FAILED,
|
||||
|
||||
Reference in New Issue
Block a user