INNER CODE UNIT · JavaScript
duration
bvisible/mcp-ssh-manager · src/index.js:1143
const duration = Date.now() - startTime;
if (code !== 0) {
logger.error(`Rsync ${direction} failed`, {
server: serverName,
exitCode: code,
error: errorOutput,
duration: `${duration}ms`
});
// Check if it's an SSH key error
if (detectSSHKeyError(errorOutput)) {
const hostInfo = extractHostFromSSHError(errorOutput);
let errorMsg = `SSH host key verification failed for ${serverName}.\n`;
if (hostInfo) {
errorMsg += `Host: ${hostInfo.host}:${hostInfo.port}\n`;
}