mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
refactor: text-embedding interfaces to returns list[int]
This commit is contained in:
33
api/core/plugin/manager/exc.py
Normal file
33
api/core/plugin/manager/exc.py
Normal file
@ -0,0 +1,33 @@
|
||||
class PluginDaemonError(Exception):
|
||||
"""Base class for all plugin daemon errors."""
|
||||
|
||||
def __init__(self, description: str) -> None:
|
||||
self.description = description
|
||||
|
||||
|
||||
class PluginDaemonInternalServerError(PluginDaemonError):
|
||||
description: str = "Internal Server Error"
|
||||
|
||||
|
||||
class PluginDaemonBadRequestError(PluginDaemonError):
|
||||
description: str = "Bad Request"
|
||||
|
||||
|
||||
class PluginDaemonNotFoundError(PluginDaemonError):
|
||||
description: str = "Not Found"
|
||||
|
||||
|
||||
class PluginUniqueIdentifierError(PluginDaemonError):
|
||||
description: str = "Unique Identifier Error"
|
||||
|
||||
|
||||
class PluginNotFoundError(PluginDaemonError):
|
||||
description: str = "Plugin Not Found"
|
||||
|
||||
|
||||
class PluginDaemonUnauthorizedError(PluginDaemonError):
|
||||
description: str = "Unauthorized"
|
||||
|
||||
|
||||
class PluginPermissionDeniedError(PluginDaemonError):
|
||||
description: str = "Permission Denied"
|
||||
Reference in New Issue
Block a user