Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: handle PluginPermissionDeniedError in EndpointCreateApi (#18597)
Yeuolyba9357da9680
diff --git a/api/controllers/console/workspace/endpoint.py b/api/controllers/console/workspace/endpoint.pyindex a5bd2a4bcf3..46dee20f8bf 100644--- a/api/controllers/console/workspace/endpoint.py+++ b/api/controllers/console/workspace/endpoint.py@@ -5,6 +5,7 @@ from werkzeug.exceptions import Forbiddenfrom controllers.console import apifrom controllers.console.wraps import account_initialization_required, setup_requiredfrom core.model_runtime.utils.encoders import jsonable_encoder+from core.plugin.manager.exc import PluginPermissionDeniedErrorfrom libs.login import login_requiredfrom services.plugin.endpoint_service import EndpointService@@ -28,15 +29,18 @@ class EndpointCreateApi(Resource):settings = args["settings"]name = args["name"]- return {- "success": EndpointService.create_endpoint(- tenant_id=user.current_tenant_id,- user_id=user.id,- plugin_unique_identifier=plugin_unique_identifier,- name=name,- settings=settings,- )- }+ try:+ return {+ "success": EndpointService.create_endpoint(+ tenant_id=user.current_tenant_id,+ user_id=user.id,+ plugin_unique_identifier=plugin_unique_identifier,+ name=name,+ settings=settings,+ )+ }+ except PluginPermissionDeniedError as e:+ raise ValueError(e.description) from eclass EndpointListApi(Resource):