pub enum UpstreamErrorClass {
AuthError,
BadInput,
Quota,
RateLimited,
ServerError,
TransportError,
}Expand description
Coarse classification of an upstream failure. Each class maps to a
distinct Sentry bucket via a unique literal tracing::error! /
tracing::warn! message — that’s how grouping survives across
providers without collapsing every error into one mega-bucket.
Variants§
AuthError
401 / 403 / 407 — credentials missing, revoked, or insufficient.
BadInput
400 / 404 (non-no-records) / 422 — request shape was wrong.
Quota
402 — out of credit; not actionable code-side. Always Warning.
RateLimited
429 — rate limited. Often actionable as a retry; Warning level.
ServerError
5xx — upstream service broke.
TransportError
0 — no HTTP status (DNS, TCP, TLS, MCP transport error, etc.).
Implementations§
Source§impl UpstreamErrorClass
impl UpstreamErrorClass
pub fn classify(upstream_status: u16) -> Self
Sourcepub fn is_quota_class(self) -> bool
pub fn is_quota_class(self) -> bool
True for classes that should NOT page on-call. The Sentry
before_send hook drops these silently to keep the issue list
useful — they still appear as breadcrumbs inside the next real
event so context isn’t lost.
Trait Implementations§
Source§impl Clone for UpstreamErrorClass
impl Clone for UpstreamErrorClass
Source§fn clone(&self) -> UpstreamErrorClass
fn clone(&self) -> UpstreamErrorClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for UpstreamErrorClass
Source§impl Debug for UpstreamErrorClass
impl Debug for UpstreamErrorClass
impl Eq for UpstreamErrorClass
Source§impl PartialEq for UpstreamErrorClass
impl PartialEq for UpstreamErrorClass
Source§fn eq(&self, other: &UpstreamErrorClass) -> bool
fn eq(&self, other: &UpstreamErrorClass) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UpstreamErrorClass
Auto Trait Implementations§
impl Freeze for UpstreamErrorClass
impl RefUnwindSafe for UpstreamErrorClass
impl Send for UpstreamErrorClass
impl Sync for UpstreamErrorClass
impl Unpin for UpstreamErrorClass
impl UnsafeUnpin for UpstreamErrorClass
impl UnwindSafe for UpstreamErrorClass
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
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§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
key and return true if they are equal.