1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use thiserror::Error;
use alloc::string::String;

#[derive(Debug, Error)]
pub enum BodyError {
    #[error("network error")]
    Network(String),
    #[error("io error")]
    Io(#[from] std::io::Error),
    #[error("unable to convert to bytes")]
    DecodeToBytes(String),
    #[error("unable to decode body")]
    Decode,
    #[error("unknown error")]
    Unknown,
}