Skip to main content

ErrorClass

Enum ErrorClass 

Source
#[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
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.
§

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

Source

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.

Source

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

Source§

fn clone(&self) -> ErrorClass

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorClass

Source§

impl Debug for ErrorClass

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ErrorClass

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ErrorClass

Source§

impl Hash for ErrorClass

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ErrorClass

Source§

fn eq(&self, other: &ErrorClass) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ErrorClass

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ErrorClass

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.