Merge branch 'main' into fix/chore-fix

This commit is contained in:
Yeuoly
2024-11-08 13:47:24 +08:00
53 changed files with 1132 additions and 157 deletions

View File

@ -195,7 +195,7 @@ class ApiToolManageService:
# try to parse schema, avoid SSRF attack
ApiToolManageService.parser_api_schema(schema)
except Exception as e:
logger.error(f"parse api schema error: {str(e)}")
logger.exception(f"parse api schema error: {str(e)}")
raise ValueError("invalid schema, please check the url you provided")
return {"schema": schema}

View File

@ -196,8 +196,7 @@ class ToolTransformService:
username = user.name
except Exception as e:
logger.error(f"failed to get user name for api provider {db_provider.id}: {str(e)}")
logger.exception(f"failed to get user name for api provider {db_provider.id}: {str(e)}")
# add provider into providers
credentials = db_provider.credentials
result = ToolProviderApiEntity(