fix(oauth): add error handling for OAuth parameter decryption

This commit is contained in:
Harry 2025-07-11 22:34:07 +08:00
parent 5090f63df5
commit 8fc5ccab35
1 changed files with 4 additions and 1 deletions

View File

@ -502,7 +502,10 @@ class BuiltinToolManageService:
.first()
)
if system_client:
oauth_params = decrypt_system_oauth_params(system_client.encrypted_oauth_params)
try:
oauth_params = decrypt_system_oauth_params(system_client.encrypted_oauth_params)
except Exception as e:
raise ValueError(f"Error decrypting system oauth params: {e}")
return oauth_params