sfr_types/error/
api.rs

1//! The type that represents all erros in `sfr-slack-api`.
2
3use crate::error::BoxError;
4
5/// The type that represents all erros in `sfr-slack-api`.
6#[derive(thiserror::Error, Debug)]
7pub enum ApiError {
8    /// The error while requesting by HTTP.
9    #[error("failed requesting `{0}`: {1}")]
10    FailedToRequestByHttp(&'static str, BoxError),
11
12    /// The error while reading JSON data.
13    #[error("failed to read JSON in `{0}`: {1}")]
14    FailedToReadJson(&'static str, BoxError),
15
16    /// The error while reading the file in `files.upload`.
17    #[error("failed to read file: {0}")]
18    FailedToReadFileInFilesUpload(BoxError),
19
20    /// The error while reading stream.
21    #[error("failed to read strem in `{0}`: {1}")]
22    FailedToReadStream(&'static str, BoxError),
23
24    /// The error while creating the multipart form data.
25    #[error("failed creating multipart form data: {0}")]
26    FailedCreatingMulipartData(BoxError),
27}