aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/system.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/system.rs')
-rw-r--r--src/rpc/system.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rpc/system.rs b/src/rpc/system.rs
index eb2f2e42..78d538ec 100644
--- a/src/rpc/system.rs
+++ b/src/rpc/system.rs
@@ -383,10 +383,14 @@ impl System {
}
}
}
- return Err(Error::Message(format!(
- "Could not connect to specified peers. Errors: {:?}",
- errors
- )));
+ if errors.len() == 1 {
+ return Err(Error::Message(errors[0].1.to_string()));
+ } else {
+ return Err(Error::Message(format!(
+ "Could not connect to specified peers. Errors: {:?}",
+ errors
+ )));
+ }
}
// ---- INTERNALS ----