objectstore_client/
error.rs

1/// Errors that can happen within the objectstore-client
2#[derive(Debug, thiserror::Error)]
3pub enum Error {
4    /// Any error emitted from the underlying [`reqwest`] client.
5    #[error(transparent)]
6    Reqwest(#[from] reqwest::Error),
7    /// IO errors related to payload streaming.
8    #[error(transparent)]
9    Io(#[from] std::io::Error),
10    /// Errors related to UTF-8 dcoding
11    #[error(transparent)]
12    Utf8(#[from] std::string::FromUtf8Error),
13    /// Errors handling metadata, such as serializing it to/from HTTP headers.
14    #[error(transparent)]
15    Metadata(#[from] objectstore_types::Error),
16}
17
18/// A convenience alias that defaults our [`Error`] type.
19pub type Result<T, E = Error> = std::result::Result<T, E>;