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: hit testing throws errors cause internal server error (#1865)
takatost4562e83b2421
diff --git a/api/controllers/console/datasets/hit_testing.py b/api/controllers/console/datasets/hit_testing.pyindex 79c7878717d..06f75e27064 100644--- a/api/controllers/console/datasets/hit_testing.py+++ b/api/controllers/console/datasets/hit_testing.py@@ -1,6 +1,8 @@import loggingfrom flask_login import current_user++from core.model_runtime.errors.invoke import InvokeErrorfrom libs.login import login_requiredfrom flask_restful import Resource, reqparse, marshalfrom werkzeug.exceptions import InternalServerError, NotFound, Forbidden@@ -8,7 +10,7 @@ from werkzeug.exceptions import InternalServerError, NotFound, Forbiddenimport servicesfrom controllers.console import apifrom controllers.console.app.error import ProviderNotInitializeError, ProviderQuotaExceededError, \- ProviderModelCurrentlyNotSupportError+ ProviderModelCurrentlyNotSupportError, CompletionRequestErrorfrom controllers.console.datasets.error import HighQualityDatasetOnlyError, DatasetNotInitializedErrorfrom controllers.console.setup import setup_requiredfrom controllers.console.wraps import account_initialization_required@@ -69,6 +71,8 @@ class HitTestingApi(Resource):raise ProviderNotInitializeError(f"No Embedding Model or Reranking Model available. Please configure a valid provider "f"in the Settings -> Model Provider.")+ except InvokeError as e:+ raise CompletionRequestError(e.description)except ValueError as e:raise ValueError(str(e))except Exception as e: