From 6ee7ca1890cdaf491bac82f5f2b852e10ea783dc Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Tue, 24 Dec 2024 22:00:45 +0800 Subject: [PATCH] fix: add specific exceptions --- api/core/tools/utils/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/tools/utils/parser.py b/api/core/tools/utils/parser.py index 06bbf92bde..40d3eb9396 100644 --- a/api/core/tools/utils/parser.py +++ b/api/core/tools/utils/parser.py @@ -283,7 +283,7 @@ class ApiBasedToolSchemaParser: api = openai_plugin["api"] api_url = api["url"] api_type = api["type"] - except: + except JSONDecodeError: raise ToolProviderNotFoundError("Invalid openai plugin json.") if api_type != "openapi":