{"modulePath":"github.com/shipyard/shipyard-cli","version":"v1.12.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\n## Types\n\n```go\ntype MCPError struct {\n\tOperation  string // The operation that failed (e.g., \"get_environment\")\n\tMessage    string // Human-readable error message\n\tSuggestion string // Optional suggestion for the user\n\tCause      error  // The underlying error\n\tStatusCode int    // HTTP status code if applicable\n}\n```\nMCPError represents an MCP-specific error with context and suggestions\n\n```go\nfunc ConflictError(operation, action, resourceType, resourceID, currentState string) *MCPError\n```\nConflictError creates an error for state conflicts\n\n```go\nfunc NetworkError(operation string, cause error) *MCPError\n```\nNetworkError creates an error for network/connectivity issues\n\n```go\nfunc NewMCPError(operation, message string, cause error) *MCPError\n```\nNewMCPError creates a new MCP error with context\n\n```go\nfunc NotFoundError(operation, resourceType, resourceID string) *MCPError\n```\nNotFoundError creates an error for when a resource is not found\n\n```go\nfunc ParseHTTPError(operation string, err error, resourceID string) *MCPError\n```\nParseHTTPError converts HTTP errors into user-friendly MCP errors\n\n```go\nfunc PermissionError(operation, resourceType, resourceID string) *MCPError\n```\nPermissionError creates an error for permission/access issues\n\n```go\nfunc ServerError(operation string, cause error) *MCPError\n```\nServerError creates an error for server-side issues\n\n```go\nfunc ValidationError(operation, parameter, issue string) *MCPError\n```\nValidationError creates an error for parameter validation failures\n\n```go\nfunc (e *MCPError) Error() string\n```\n\n```go\nfunc (e *MCPError) ToJSONRPCCode() int\n```\nToJSONRPCError converts an MCPError to appropriate JSON-RPC error code\n\n```go\nfunc (e *MCPError) Unwrap() error\n```\n\n```go\nfunc (e *MCPError) WithStatusCode(code int) *MCPError\n```\nWithStatusCode adds an HTTP status code to the error\n\n```go\nfunc (e *MCPError) WithSuggestion(suggestion string) *MCPError\n```\nWithSuggestion adds a suggestion to the error\n\n","path":"github.com/shipyard/shipyard-cli/pkg/mcp/errors","name":"errors","synopsis":"","isRedistributable":true}
