pub enum SlackError {
Api(Box<SlackApiError>),
RateLimited {
retry_after: Option<Duration>,
},
Http {
status: u16,
body: String,
},
Transport(Error),
Decode {
source: Error,
body: String,
},
Encode(String),
MissingField(&'static str),
Task(String),
}Expand description
Error returned by a Web API call.
Variants§
Api(Box<SlackApiError>)
Slack answered "ok": false (invalid_auth, channel_not_found, …).
RateLimited
Still rate limited (429) after the configured number of retries.
Http
A non-2xx status with a body that is not a Slack JSON response.
Transport(Error)
Connection or transfer failure.
Decode
The response body could not be decoded into the response type.
Encode(String)
The request could not be encoded as a form body.
MissingField(&'static str)
A successful response lacked a field needed for the next step.
Task(String)
A background upload task stopped before finishing.
Implementations§
Trait Implementations§
Source§impl Debug for SlackError
impl Debug for SlackError
Source§impl Display for SlackError
impl Display for SlackError
Source§impl Error for SlackError
impl Error for SlackError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SlackError
impl !UnwindSafe for SlackError
impl Freeze for SlackError
impl Send for SlackError
impl Sync for SlackError
impl Unpin for SlackError
impl UnsafeUnpin for SlackError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more