pub enum ProviderErrorKind {
Auth,
RateLimit,
ModelNotFound,
Quota,
Overloaded,
Timeout,
Spawn,
Protocol,
Other,
}Expand description
Structured classification of a provider failure.
This is the machine-readable category SDK/plugin consumers branch on instead
of matching substrings in the human message (the reason this type exists: a
timeout is ProviderErrorKind::Timeout, not message.contains("timed out")). It is part of the JSON error contract — it serializes as a
snake_case string and is re-exported through every SDK’s generated models, so
the vocabulary here is the vocabulary consumers see.
The set is closed on purpose so the generated SDK types are exhaustive
unions; a failure skilltest cannot map to a specific category (e.g. a
provider or oneharness failure label added upstream that this version does
not recognize) becomes ProviderErrorKind::Other rather than a new,
unhandled string.
Variants§
Auth
Authentication/authorization failed (missing or rejected credentials).
RateLimit
The provider rate-limited the call; a backoff-and-retry may succeed.
ModelNotFound
The harness/vendor does not recognize the requested model.
Quota
The account’s quota or billing limit is exhausted.
Overloaded
A transient server-side overload; retried internally where possible.
Timeout
The call exceeded its deadline (harness --timeout, curl --max-time).
Spawn
The provider process could not be started (binary missing, not runnable).
Protocol
The provider ran but produced output that violated the protocol (unparseable envelope, missing results, malformed verdict).
Other
A classified failure that does not map to a more specific category. The
human message carries the specifics.
Implementations§
Source§impl ProviderErrorKind
impl ProviderErrorKind
Sourcepub fn classify(raw: &str) -> Self
pub fn classify(raw: &str) -> Self
Map a raw failure label — an oneharness failure_kind, or a vendor error
class skilltest already normalized to one of these snake_case strings — to
a category. Unrecognized labels become ProviderErrorKind::Other.
Trait Implementations§
Source§impl Clone for ProviderErrorKind
impl Clone for ProviderErrorKind
Source§fn clone(&self) -> ProviderErrorKind
fn clone(&self) -> ProviderErrorKind
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 ProviderErrorKind
Source§impl Debug for ProviderErrorKind
impl Debug for ProviderErrorKind
Source§impl<'de> Deserialize<'de> for ProviderErrorKind
impl<'de> Deserialize<'de> for ProviderErrorKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ProviderErrorKind
impl Display for ProviderErrorKind
impl Eq for ProviderErrorKind
Source§impl Hash for ProviderErrorKind
impl Hash for ProviderErrorKind
Source§impl JsonSchema for ProviderErrorKind
impl JsonSchema for ProviderErrorKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ProviderErrorKind
impl PartialEq for ProviderErrorKind
Source§fn eq(&self, other: &ProviderErrorKind) -> bool
fn eq(&self, other: &ProviderErrorKind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ProviderErrorKind
impl Serialize for ProviderErrorKind
impl StructuralPartialEq for ProviderErrorKind
Auto Trait Implementations§
impl Freeze for ProviderErrorKind
impl RefUnwindSafe for ProviderErrorKind
impl Send for ProviderErrorKind
impl Sync for ProviderErrorKind
impl Unpin for ProviderErrorKind
impl UnsafeUnpin for ProviderErrorKind
impl UnwindSafe for ProviderErrorKind
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.