Make Bad Response error print the actual response

This commit is contained in:
rhn 2017-11-01 18:15:34 +01:00
parent d9caeccc57
commit c899986685

View file

@ -62,6 +62,9 @@ impl fmt::Display for Error {
Error::Io(ref e) => fmt::Display::fmt(e, f),
Error::Tls(ref e) => fmt::Display::fmt(e, f),
Error::TlsHandshake(ref e) => fmt::Display::fmt(e, f),
Error::BadResponse(ref data) => {
write!(f, "{}: {}", &String::from(self.description()), &data.join("\n"))
}
ref e => f.write_str(e.description()),
}
}