Skip to main content
Glama

microsandbox

by microsandbox
error.rs1.42 kB
use std::error::Error; use std::fmt; /// Common error types for the Microsandbox SDK #[derive(Debug)] pub enum SandboxError { /// The sandbox has not been started NotStarted, /// The request to the server failed RequestFailed(String), /// The server returned an error ServerError(String), /// The sandbox timed out Timeout(String), /// An error occurred with the HTTP client HttpError(String), /// Invalid response received from server InvalidResponse(String), /// General error General(String), } impl fmt::Display for SandboxError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { SandboxError::NotStarted => write!(f, "Sandbox is not started. Call start() first."), SandboxError::RequestFailed(msg) => { write!(f, "Failed to communicate with Microsandbox server: {}", msg) } SandboxError::ServerError(msg) => write!(f, "Server error: {}", msg), SandboxError::Timeout(msg) => write!(f, "Timeout error: {}", msg), SandboxError::HttpError(msg) => write!(f, "HTTP error: {}", msg), SandboxError::InvalidResponse(msg) => { write!(f, "Invalid response from server: {}", msg) } SandboxError::General(msg) => write!(f, "{}", msg), } } } impl Error for SandboxError {}

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microsandbox/microsandbox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server