#[non_exhaustive]pub enum ErrorClass {
Show 15 variants
ObjectNotFound,
InsufficientPrivilege,
SyntaxError,
ConnectionFailed,
RuntimeStateRequired,
ChallengeRequired,
LeaseRequired,
ForbiddenStatement,
OperatingLevelTooLow,
Busy,
InvalidArguments,
PolicyDenied,
Timeout,
Transient,
Internal,
}Expand description
Machine-stable classification of an agent-facing error.
Serialized as SCREAMING_SNAKE_CASE so the wire value is a stable string
an agent can branch on ("OBJECT_NOT_FOUND", "CHALLENGE_REQUIRED", …).
#[non_exhaustive] so new classes are additive, never breaking.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ObjectNotFound
Referenced schema object does not exist / is not visible (ORA-00942, ORA-04043). The agent should introspect, not retry verbatim.
InsufficientPrivilege
The connected user lacks the required Oracle privilege (ORA-01031, ORA-01017, ORA-00942 on a privileged dictionary view).
SyntaxError
The statement failed to parse / is not valid SQL or PL/SQL.
ConnectionFailed
The server could not connect to / lost its connection to Oracle.
RuntimeStateRequired
A tool was dispatched but requires runtime state that is absent — most
often a live Oracle connection (the offline RuntimeStateRequired
degradation contract).
ChallengeRequired
The operation requires a human step-up confirmation that has not yet been granted; the agent should poll the issued task (§7.2).
LeaseRequired
A stateful operation (transaction, savepoint, DBMS_OUTPUT) was attempted without an active session lease (§5.1).
ForbiddenStatement
The fail-closed classifier refused the statement outright (§5.3) — e.g. dynamic SQL via string concat, an unbalanced multi-statement batch.
OperatingLevelTooLow
The required operating level exceeds the session’s current level and the profile’s gate has not been satisfied (§6.6).
Busy
Admission control rejected the call before it touched the pool (§5.6).
InvalidArguments
The request arguments were malformed or failed validation.
PolicyDenied
A configured per-schema / protected-profile policy denied the call
(§6.2).
Timeout
The call exceeded its deadline (call timeout / cancellation).
Transient
A transient, retryable Oracle/network condition (ORA-03113, ORA-12170…).
Internal
An unexpected internal error; the agent cannot fix it by changing input.
Implementations§
Source§impl ErrorClass
impl ErrorClass
Sourcepub fn default_suggested_tool(self) -> Option<&'static str>
pub fn default_suggested_tool(self) -> Option<&'static str>
The default built-in tool an agent should reach for to recover from this class, if any.
Sourcepub fn is_retryable(self) -> bool
pub fn is_retryable(self) -> bool
Whether a caller may safely retry the same request later. Note this is about the error condition only; DML is never auto-retried regardless (§5.7) — that decision lives at the dispatch layer.
Trait Implementations§
Source§impl Clone for ErrorClass
impl Clone for ErrorClass
Source§fn clone(&self) -> ErrorClass
fn clone(&self) -> ErrorClass
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 ErrorClass
Source§impl Debug for ErrorClass
impl Debug for ErrorClass
Source§impl<'de> Deserialize<'de> for ErrorClass
impl<'de> Deserialize<'de> for ErrorClass
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 ErrorClass
Source§impl Hash for ErrorClass
impl Hash for ErrorClass
Source§impl PartialEq for ErrorClass
impl PartialEq for ErrorClass
Source§fn eq(&self, other: &ErrorClass) -> bool
fn eq(&self, other: &ErrorClass) -> bool
self and other values to be equal, and is used by ==.