openagent-claude-agent · error
Declared module signatures, types, configuration, and source documentation.
Source: openagent-sdk/integrations/claude-agent-sdk/rust/src/error.rs. SHA-256: 72d4525fbfa0afd56bb272039df2f356fc7e12968ae58d7049cd238fb25500ac.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
error::Result
Result alias used throughout the crate.
pub type Result<T> = std::result::Result<T, Error>;Source line: 6.
error::Error
All errors produced by openagent-claude-agent.
#[derive(Debug, Error)]
pub enum Error {
/// Configuration was invalid at construction time.
#[error("invalid configuration: {0}")]
Config(String),
/// A hook was invoked before the session was started.
#[error("hook called before session_start")]
NoActiveSession,
/// A tool call was rejected because the agent lacks the required scope.
#[error("tool denied: {tool} (required scope: {required_scope}; reason: {reason})")]
ToolDenied {
/// Tool name.
tool: String,
/// Scope that was checked.
required_scope: String,
/// Human-readable reason.
reason: String,
},
/// A skill invocation was rejected by the skills policy.
#[error("skill denied: {skill} (reason: {reason})")]
SkillDenied {
/// Skill name.
skill: String,
/// Reason for denial.
reason: String,
},
/// Identity signing failed.
#[error("signing failed: {0}")]
Sign(String),
/// Audit chain verification failed.
#[error("audit chain broken at index {index}")]
AuditBroken {
/// Index in the chain where verification failed.
index: usize,
},
/// JSON (de)serialisation failure.
#[error("serialization error: {0}")]
Serde(#[from] serde_json::Error),
/// I/O failure (sink, file, etc).
#[error("io error: {0}")]
Io(#[from] std::io::Error),
}Source line: 10.