diff options
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs index 62f876b..e84c85e 100644 --- a/src/client.rs +++ b/src/client.rs @@ -206,7 +206,8 @@ impl ClientConn { <T as Message>::Response, >(&resp[1..])?) } else { - Err(Error::Remote(format!("Remote error code {}", code))) + let msg = String::from_utf8(resp[1..].to_vec()).unwrap_or_default(); + Err(Error::Remote(code, msg)) } } } |