pub enum SlackActionError {
NoSlackSession,
ChannelUnavailable,
NotConfigured,
Rejected(String),
RateLimited {
retry_after_secs: Option<u64>,
},
InvalidArgument(String),
Transient(String),
}Expand description
Why an action did not happen.
Variants§
NoSlackSession
This session did not come from Slack, so there is no endpoint to act as.
The one case that is a capability configuration story rather than a fault: the agent has the capability enabled and is running somewhere the capability cannot apply.
The session’s endpoint is gone, disabled, or belongs to another org.
NotConfigured
The endpoint exists but carries no bot token yet.
Rejected(String)
Slack refused in a way retrying cannot fix (bad scope, unknown channel).
RateLimited
Slack asked us to slow down.
InvalidArgument(String)
The argument the model chose cannot be used.
Transient(String)
Network trouble, a 5xx, or a store failure.
Implementations§
Source§impl SlackActionError
impl SlackActionError
Sourcepub fn is_tool_error(&self) -> bool
pub fn is_tool_error(&self) -> bool
Whether the model should see this as a tool error it can reason about, rather than an internal fault.
Everything except Self::Transient is the model’s to act on: it can
stop offering Slack actions, correct an argument, or back off. A
transient failure is infrastructure and is reported as such.
Trait Implementations§
Source§impl Clone for SlackActionError
impl Clone for SlackActionError
Source§fn clone(&self) -> SlackActionError
fn clone(&self) -> SlackActionError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SlackActionError
impl Debug for SlackActionError
Source§impl Display for SlackActionError
impl Display for SlackActionError
Source§impl Error for SlackActionError
impl Error for SlackActionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()