pub enum FailureClass {
Show 26 variants
AuthMissing,
AuthRejected,
AccountNotFound,
ModelUnavailable,
UnsupportedParameter,
ContextLimitExceeded,
ConnectTimeout,
ReadTimeout,
StreamIdleTimeout,
ConnectionReset,
TlsFailure,
RateLimited,
ProviderServerError,
CloudflareEdgeError,
EmptyCompletion,
TruncatedCompletion,
InvalidJson,
InvalidChatCompletionShape,
InvalidSseEvent,
MissingFinishReason,
NoToolCall,
InvalidToolName,
InvalidToolArguments,
DuplicateToolCall,
ToolLoopDidNotConverge,
Unknown,
}Expand description
Typed delivery-failure taxonomy (feedback 02).
Every failure recorded for a Cloudflare Workers AI model must map to
exactly one class. Unknown is the last resort for classes not yet in
the taxonomy - never guess a specific class without evidence.
Variants§
AuthMissing
Credentials could not be resolved (missing env var or empty token).
AuthRejected
Cloudflare rejected the presented credentials (401).
AccountNotFound
The configured account could not be found or is out of scope.
The requested model is not available on this account or route.
UnsupportedParameter
A request parameter is not supported by the model or endpoint.
ContextLimitExceeded
The context window was exceeded by the request.
ConnectTimeout
Connection establishment timed out.
ReadTimeout
The upstream did not respond within the read timeout.
StreamIdleTimeout
The stream produced no event within the idle timeout.
ConnectionReset
The connection was reset mid-request or mid-stream.
TlsFailure
TLS handshake or certificate failure.
RateLimited
Cloudflare rate-limited the request (429).
ProviderServerError
The provider returned a 5xx error.
CloudflareEdgeError
Cloudflare edge error envelope (cf-ray present, success: false).
EmptyCompletion
The completion was delivered with empty content.
TruncatedCompletion
The completion was cut off before a terminal state.
InvalidJson
The response body was not valid JSON.
InvalidChatCompletionShape
The JSON did not match the Chat Completions shape.
InvalidSseEvent
An SSE event was malformed.
MissingFinishReason
A terminal chunk was missing its finish reason.
NoToolCall
The model answered without issuing the required tool call.
InvalidToolName
The tool call named an unknown or disallowed tool.
InvalidToolArguments
The tool-call arguments were not valid JSON for the schema.
DuplicateToolCall
The same tool call was issued more than once.
ToolLoopDidNotConverge
The multi-turn tool loop did not converge to a final answer.
Unknown
Failure class not yet classified - never guess a specific class.
Trait Implementations§
Source§impl Clone for FailureClass
impl Clone for FailureClass
Source§fn clone(&self) -> FailureClass
fn clone(&self) -> FailureClass
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 FailureClass
Source§impl Debug for FailureClass
impl Debug for FailureClass
Source§impl<'de> Deserialize<'de> for FailureClass
impl<'de> Deserialize<'de> for FailureClass
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>,
impl Eq for FailureClass
Source§impl PartialEq for FailureClass
impl PartialEq for FailureClass
Source§impl Serialize for FailureClass
impl Serialize for FailureClass
impl StructuralPartialEq for FailureClass
Auto Trait Implementations§
impl Freeze for FailureClass
impl RefUnwindSafe for FailureClass
impl Send for FailureClass
impl Sync for FailureClass
impl Unpin for FailureClass
impl UnsafeUnpin for FailureClass
impl UnwindSafe for FailureClass
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.