|
@@ -38,6 +38,7 @@ from core.indexing_runner import IndexingRunner
|
|
|
from core.model_manager import ModelManager
|
|
|
from core.model_runtime.entities.model_entities import ModelType
|
|
|
from core.model_runtime.errors.invoke import InvokeAuthorizationError
|
|
|
+from core.plugin.manager.exc import PluginNotFoundError
|
|
|
from core.rag.extractor.entity.extract_setting import ExtractSetting
|
|
|
from extensions.ext_database import db
|
|
|
from extensions.ext_redis import redis_client
|
|
@@ -415,6 +416,8 @@ class DocumentIndexingEstimateApi(DocumentResource):
|
|
|
)
|
|
|
except ProviderTokenNotInitError as ex:
|
|
|
raise ProviderNotInitializeError(ex.description)
|
|
|
+ except PluginNotFoundError as ex:
|
|
|
+ raise ProviderNotInitializeError(ex.description)
|
|
|
except Exception as e:
|
|
|
raise IndexingEstimateError(str(e))
|
|
|
|
|
@@ -516,6 +519,8 @@ class DocumentBatchIndexingEstimateApi(DocumentResource):
|
|
|
)
|
|
|
except ProviderTokenNotInitError as ex:
|
|
|
raise ProviderNotInitializeError(ex.description)
|
|
|
+ except PluginNotFoundError as ex:
|
|
|
+ raise ProviderNotInitializeError(ex.description)
|
|
|
except Exception as e:
|
|
|
raise IndexingEstimateError(str(e))
|
|
|
return response
|