fix(api): localize service-layer ValueError messages to Chinese

So str(exc) passthrough on scripts, batch, sync, and schedule routes
returns Chinese without relying only on the HTTP detail translation layer.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nexus Agent
2026-06-09 08:53:18 +08:00
parent a842af2405
commit 1c0d7e9eb6
8 changed files with 49 additions and 9 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ class AsyncSSHPool:
elif server.ssh_key_path:
connect_kwargs["client_keys"] = [server.ssh_key_path]
else:
raise ValueError(f"No valid SSH credentials for server {server.id} ({server.name})")
raise ValueError(f"服务器 {server.id}{server.name})没有可用的 SSH 凭据")
try:
conn = await asyncssh.connect(**connect_kwargs)