pub enum ToolErrorCode {
Show 37 variants
NotFound,
Binary,
TooLarge,
OutsideWorkspace,
Sensitive,
PermissionDenied,
InvalidParam,
IoError,
NotReadThisSession,
StaleRead,
OldStringNotFound,
OldStringNotUnique,
EmptyFile,
NoOpEdit,
BinaryNotEditable,
NotebookUnsupported,
DeniedByHook,
ValidateFailed,
InvalidRegex,
Timeout,
Killed,
InvalidUrl,
SsrfBlocked,
DnsError,
TlsError,
ConnectionReset,
Oversize,
UnsupportedContentType,
RedirectLoop,
InteractiveDetected,
ServerNotAvailable,
ServerCrashed,
PositionInvalid,
InvalidFrontmatter,
NameMismatch,
Disabled,
NotTrusted,
}Expand description
Stable set of machine-readable error codes emitted by any harness tool.
Mirrors ToolErrorCode in @agent-sh/harness-core. The string form on
the wire uses the snake_case-ish shape the TS side has been shipping
(NOT_FOUND, INVALID_PARAM, …) so a TS consumer parsing the
JSON-RPC result of a Rust tool sees the same codes it’s already
pattern-matching on.
Variants§
NotFound
Binary
TooLarge
OutsideWorkspace
Sensitive
PermissionDenied
InvalidParam
IoError
NotReadThisSession
StaleRead
OldStringNotFound
OldStringNotUnique
EmptyFile
NoOpEdit
BinaryNotEditable
NotebookUnsupported
DeniedByHook
ValidateFailed
InvalidRegex
Timeout
Killed
InvalidUrl
SsrfBlocked
DnsError
TlsError
ConnectionReset
Oversize
UnsupportedContentType
RedirectLoop
InteractiveDetected
ServerNotAvailable
ServerCrashed
PositionInvalid
InvalidFrontmatter
NameMismatch
Disabled
NotTrusted
Implementations§
Trait Implementations§
Source§impl Clone for ToolErrorCode
impl Clone for ToolErrorCode
Source§fn clone(&self) -> ToolErrorCode
fn clone(&self) -> ToolErrorCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolErrorCode
impl Debug for ToolErrorCode
Source§impl<'de> Deserialize<'de> for ToolErrorCode
impl<'de> Deserialize<'de> for ToolErrorCode
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolErrorCode
impl PartialEq for ToolErrorCode
Source§impl Serialize for ToolErrorCode
impl Serialize for ToolErrorCode
impl Copy for ToolErrorCode
impl Eq for ToolErrorCode
impl StructuralPartialEq for ToolErrorCode
Auto Trait Implementations§
impl Freeze for ToolErrorCode
impl RefUnwindSafe for ToolErrorCode
impl Send for ToolErrorCode
impl Sync for ToolErrorCode
impl Unpin for ToolErrorCode
impl UnsafeUnpin for ToolErrorCode
impl UnwindSafe for ToolErrorCode
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
Mutably borrows from an owned value. Read more