#[non_exhaustive]pub enum TeamsError {
Unauthorized,
Forbidden {
message: String,
},
RateLimited {
status: u16,
},
Refused {
status: u16,
message: String,
},
Unreachable {
reason: String,
},
InvalidResponse {
reason: String,
},
}Expand description
Why the Teams adapter could not talk to Microsoft Teams.
Never carries the app password or an access token. Converts into AdkError with a
surface.teams.* code and provider teams.
§Example
use adk_surface::channels::TeamsError;
let error = TeamsError::Unauthorized;
assert_eq!(error.code(), "surface.teams.unauthorized");
assert!(error.to_string().contains("TEAMS_APP_PASSWORD"));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Microsoft Entra ID refused the bot’s credentials, or the Bot Connector refused its token.
Forbidden
The Bot Connector refused the send, such as a person who blocked or uninstalled the
app (MessageWritesBlocked).
RateLimited
The Bot Connector throttled the bot (HTTP 429, or 412, 502 or 504, which Teams asks bots to retry).
Refused
The Bot Connector refused the send, such as an unknown conversation or a message too large.
Unreachable
Microsoft Teams or Microsoft Entra ID could not be reached.
InvalidResponse
An answer that was not the Bot Framework’s JSON.
Implementations§
Trait Implementations§
Source§impl Clone for TeamsError
impl Clone for TeamsError
Source§impl Debug for TeamsError
impl Debug for TeamsError
Source§impl Display for TeamsError
impl Display for TeamsError
impl Eq for TeamsError
Source§impl Error for TeamsError
impl Error for TeamsError
1.30.0 · 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()
Source§impl From<TeamsError> for AdkError
impl From<TeamsError> for AdkError
Source§fn from(error: TeamsError) -> Self
fn from(error: TeamsError) -> Self
Converts to this type from the input type.
Source§impl From<TeamsError> for KernelError
impl From<TeamsError> for KernelError
Source§fn from(error: TeamsError) -> Self
fn from(error: TeamsError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TeamsError
impl PartialEq for TeamsError
impl StructuralPartialEq for TeamsError
Auto Trait Implementations§
impl Forget for TeamsError
impl Freeze for TeamsError
impl Move for TeamsError
impl RefUnwindSafe for TeamsError
impl Send for TeamsErrorwhere
RawVecInner: Send,
impl Sync for TeamsErrorwhere
RawVecInner: Sync,
impl Unpin for TeamsError
impl UnsafeUnpin for TeamsError
impl UnwindSafe for TeamsErrorwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more