pub enum McpCallError {
ResponseTooLarge,
Internal {
message: &'static str,
},
AuthExpired,
Mcp {
message: String,
},
Upstream {
status: u16,
body: String,
},
Transport(String),
Local(String),
}Expand description
Why an outbound MCP tools/call failed. The host fn maps each to a catchable
script error (see [mcp_error_to_throw]).
Variants§
ResponseTooLarge
The tool ran but its response exceeded the host’s bounded output buffer.
Internal
Internal initialization, allocation or serialization failure; never a guest exception.
AuthExpired
OAuth authentication failed. A provider rejection may be transient;
surfaces to the script as a catchable McpAuthExpiredError.
Mcp
The server reported a tool-level or JSON-RPC error.
Upstream
A non-2xx HTTP response from the server.
Transport(String)
The request never completed (connection / transport failure).
Local(String)
Refused by this host’s own configuration before anything was sent: unavailable credentials, or the network policy. Reads as a transport error to the script.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpCallError
impl RefUnwindSafe for McpCallError
impl Send for McpCallError
impl Sync for McpCallError
impl Unpin for McpCallError
impl UnsafeUnpin for McpCallError
impl UnwindSafe for McpCallError
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