errors

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Embedder errors
	ErrEmbedderNotInitialized = errors.New("embedder not initialized")
	ErrEmbedderInitFailed     = errors.New("failed to initialize embedder")

	// Collection errors
	ErrCollectionNotFound = errors.New("collection not found")
	ErrCollectionExists   = errors.New("collection already exists")

	// Client/connection errors
	ErrConnectionFailed = errors.New("connection failed")
	ErrRequestFailed    = errors.New("request failed")
	ErrInvalidResponse  = errors.New("invalid response from server")

	// Validation errors
	ErrInvalidInput   = errors.New("invalid input")
	ErrFileNotFound   = errors.New("file not found")
	ErrPathTraversal  = errors.New("path traversal detected")
	ErrPathOutsideCWD = errors.New("path outside working directory")
	ErrAbsolutePath   = errors.New("absolute paths not allowed")
	ErrEmptyDocuments = errors.New("no documents provided")
	ErrEmptyQueries   = errors.New("no queries provided")

	// Configuration errors
	ErrMissingConfig = errors.New("missing configuration")
	ErrInvalidConfig = errors.New("invalid configuration")
)

Functions

func As

func As[T error](err error) (T, bool)

As checks if an error can be cast to a specific type. Kept for convenience but standard errors.As can be used.

func Is

func Is(err error, target ...error) bool

Is checks if an error matches any of the expected errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

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