update request api

This commit is contained in:
yggverse 2025-01-22 15:14:59 +02:00
parent 52141f3dca
commit 5e52e74870
6 changed files with 37 additions and 78 deletions

View file

@ -2,16 +2,16 @@ use std::fmt::{Display, Formatter, Result};
#[derive(Debug)]
pub enum Error {
Request((Vec<u8>, glib::Error)),
Response(crate::client::connection::response::Error),
Stream(glib::Error),
TlsClientConnection(glib::Error),
}
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Stream(e) => {
write!(f, "TLS client connection error: {e}")
Self::Request((_, e)) => {
write!(f, "Request error: {e}")
}
Self::Response(e) => {
write!(f, "Response error: {e}")