assorted fixes

This commit is contained in:
Aiden McClelland
2021-08-13 12:34:29 -06:00
parent 26dd880633
commit c223894943
10 changed files with 154 additions and 75 deletions

View File

@@ -38,7 +38,7 @@ fn inner_main() -> Result<(), Error> {
|e: RpcError| {
match e.data {
Some(Value::String(s)) => eprintln!("{}: {}", e.message, s),
Some(Value::Object(o)) => if let Some(Value::String(s)) = o.get("message") {
Some(Value::Object(o)) => if let Some(Value::String(s)) = o.get("details") {
eprintln!("{}: {}", e.message, s)
}
Some(a) => eprintln!("{}: {}", e.message, a),

View File

@@ -35,7 +35,7 @@ fn inner_main() -> Result<(), Error> {
|e: RpcError| {
match e.data {
Some(Value::String(s)) => eprintln!("{}: {}", e.message, s),
Some(Value::Object(o)) => if let Some(Value::String(s)) = o.get("message") {
Some(Value::Object(o)) => if let Some(Value::String(s)) = o.get("details") {
eprintln!("{}: {}", e.message, s)
}
Some(a) => eprintln!("{}: {}", e.message, a),