opt(chat): Enhance error handling for chat.send timeouts and improve logging in gateway RPC calls (#788)

This commit is contained in:
Haze
2026-04-07 17:07:57 +08:00
committed by GitHub
Unverified
parent c3a735a49c
commit 97d29ab23c
3 changed files with 30 additions and 7 deletions

View File

@@ -1152,6 +1152,7 @@ function registerGatewayHandlers(
const result = await gatewayManager.rpc(method, params, timeoutMs);
return { success: true, result };
} catch (error) {
logger.warn(`[gateway:rpc] ${method} failed (timeoutMs=${timeoutMs ?? 30000}): ${String(error)}`);
return { success: false, error: String(error) };
}
});