Browse Source

fix: add specific exceptions

Yeuoly 4 months ago
parent
commit
6ee7ca1890
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/core/tools/utils/parser.py

+ 1 - 1
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":