errors

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProviderUnreachable = errors.New("provider unreachable")
	ErrProviderNotFound    = errors.New("provider not found")
	ErrInvalidProvider     = errors.New("invalid provider name")
	ErrRateLimited         = errors.New("rate limited")
	ErrInvalidKey          = errors.New("invalid API key")
	ErrNoCredits           = errors.New("no credits available")
	ErrContextExceeded     = errors.New("context window exceeded")
	ErrModelNotFound       = errors.New("model not found")
	ErrSessionCorrupted    = errors.New("session data corrupted")
	ErrNoBinaryContent     = errors.New("binary content not displayable")
	ErrFileTooLarge        = errors.New("file exceeds 5MB limit")
	ErrCircularDependency  = errors.New("circular dependency in task graph")
	ErrPermissionDenied    = errors.New("permission denied")
	ErrToolExecution       = errors.New("tool execution failed")
	ErrTaskFailed          = errors.New("task failed")
	ErrPhaseTransition     = errors.New("invalid phase transition")
	ErrCheckpointNotFound  = errors.New("checkpoint not found")
	// Reject oversized LLM response payloads to prevent OOM.
	ErrToolInputTooLarge = errors.New("tool input exceeds size limit")
	// Bash timeout must be positive and <= 30 minutes.
	ErrInvalidTimeout = errors.New("invalid timeout: must be > 0 and <= 30m")
	// WebFetch SSRF — block private/loopback/link-local IPs.
	ErrPrivateIPBlocked = errors.New("access to private IP is blocked (SSRF protection)")
	// SSE stream truncated before [DONE] sentinel.
	ErrStreamTruncated = errors.New("stream truncated before completion")
	// git bisect reset failed (e.g. no commits in range).
	ErrBisectResetFailed = errors.New("bisect reset failed")
	ErrBisectFailed      = errors.New("bisect failed")

	// Session-specific errors for distinct failure modes.
	ErrSessionNotFound   = errors.New("session not found")
	ErrSessionPermission = errors.New("session access denied")
)

Functions

func UserMessage

func UserMessage(e error) string

UserMessage returns a user-friendly, actionable message for common errors. Falls back to a generic message for unrecognized errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL