Refine transaction log count message
This commit is contained in:
parent
6d9ca0ae15
commit
b5ef319038
|
@ -153,8 +153,12 @@ impl fmt::Display for RpcResponseErrorData {
|
||||||
logs: Some(logs), ..
|
logs: Some(logs), ..
|
||||||
},
|
},
|
||||||
) => {
|
) => {
|
||||||
// Give the user a hint that there is more useful logging information available...
|
if logs.is_empty() {
|
||||||
write!(f, "{} log messages", logs.len())
|
Ok(())
|
||||||
|
} else {
|
||||||
|
// Give the user a hint that there is more useful logging information available...
|
||||||
|
write!(f, "[{} log messages]", logs.len())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => Ok(()),
|
_ => Ok(()),
|
||||||
}
|
}
|
||||||
|
@ -165,7 +169,7 @@ impl fmt::Display for RpcResponseErrorData {
|
||||||
pub enum RpcError {
|
pub enum RpcError {
|
||||||
#[error("RPC request error: {0}")]
|
#[error("RPC request error: {0}")]
|
||||||
RpcRequestError(String),
|
RpcRequestError(String),
|
||||||
#[error("RPC response error {code}: {message} [{data}]")]
|
#[error("RPC response error {code}: {message} {data}")]
|
||||||
RpcResponseError {
|
RpcResponseError {
|
||||||
code: i64,
|
code: i64,
|
||||||
message: String,
|
message: String,
|
||||||
|
|
Loading…
Reference in New Issue