Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/core/plugin/endpoint/exc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class EndpointSetupFailedError(ValueError):
"""
Endpoint setup failed error
"""

pass
3 changes: 3 additions & 0 deletions api/core/plugin/impl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
InvokeServerUnavailableError,
)
from core.model_runtime.errors.validate import CredentialsValidateFailedError
from core.plugin.endpoint.exc import EndpointSetupFailedError
from core.plugin.entities.plugin_daemon import PluginDaemonBasicResponse, PluginDaemonError, PluginDaemonInnerError
from core.plugin.impl.exc import (
PluginDaemonBadRequestError,
Expand Down Expand Up @@ -219,6 +220,8 @@ def _handle_plugin_daemon_error(self, error_type: str, message: str):
raise InvokeServerUnavailableError(description=args.get("description"))
case CredentialsValidateFailedError.__name__:
raise CredentialsValidateFailedError(error_object.get("message"))
case EndpointSetupFailedError.__name__:
raise EndpointSetupFailedError(error_object.get("message"))
case _:
raise PluginInvokeError(description=message)
case PluginDaemonInternalServerError.__name__:
Expand Down