pub enum ErrorCode {
Show 14 variants
HyperdNotFound,
FileNotFound,
UnsupportedFormat,
SchemaMismatch,
SqlError,
TableNotFound,
EmptyData,
DiskFull,
PermissionDenied,
ReadOnlyViolation,
ConnectionLost,
InvalidArgument,
ResourceBusy,
InternalError,
}Expand description
Machine-readable error codes returned in MCP tool error responses.
Serialized as SCREAMING_SNAKE_CASE (e.g. HYPERD_NOT_FOUND) so LLM clients
can pattern-match without parsing prose.
Variants§
HyperdNotFound
The hyperd binary was not found at HYPERD_PATH or on PATH.
FileNotFound
A file path argument points to a nonexistent or unreadable file.
UnsupportedFormat
The file extension or explicit format string is not one we handle.
SchemaMismatch
Data doesn’t match the inferred or user-provided schema.
SqlError
SQL syntax error or reference to a nonexistent column.
TableNotFound
A referenced table does not exist in the workspace.
EmptyData
The input data is empty (zero rows or zero columns).
DiskFull
Workspace disk is full or write quota exceeded.
PermissionDenied
Filesystem permission denied on a source or target path.
ReadOnlyViolation
Server is running in read-only mode and the requested operation would mutate state.
ConnectionLost
The connection to hyperd was lost (crash, broken pipe, EOF) or
the wire protocol fell out of sync (a bounded drain exhausted
without reaching ReadyForQuery, surfacing as a
"desynchronized" error message from the hyper-client layer).
Either way, the connection is unusable and the MCP server will
automatically tear down the crate::engine::Engine and
reconnect on the next call.
InvalidArgument
A tool argument is malformed or violates a precondition that the
caller can fix (bad alias shape, wrong mode string, reserved name,
etc.). Distinct from Self::SchemaMismatch in that the argument
itself is wrong, not the data it refers to.
ResourceBusy
A resource (typically a .hyper file) is held by another process
and cannot be opened exclusively. Surfaced when ATTACH DATABASE
fails because another MCP server or hyperd owns the file.
InternalError
Catch-all for unexpected failures (panics, I/O, lock poisoning).
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
impl<T> Allocation for T
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,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request