commerr

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 1 Imported by: 5

Documentation

Overview

Package commerr holds the common sentinel errors shared across services: the vocabulary ctxerrors' error map translates foreign driver errors into, and that callers match with errors.Is. Each is a plain comparable error, so wrapping one with ctxerrors.Wrap keeps errors.Is(err, commerr.ErrX) true through every layer.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Configuration & Environment errors
	ErrEnvVarNotSet              = errors.New("env var is not set")
	ErrRequiredConfigValueNotSet = errors.New("required config value is not set")
	ErrEmptyMigrationsPath       = errors.New("migrations path is empty")

	// File & Path errors
	ErrFileInvalid           = errors.New("invalid file")
	ErrFileNotFound          = errors.New("file not found")
	ErrPathIsRequired        = errors.New("path is required")
	ErrCouldNotDownloadFiles = errors.New("could not download files")

	// Validation & Input errors
	ErrInvalidArgument  = errors.New("invalid argument")
	ErrInvalidValue     = errors.New("invalid value")
	ErrTargetNotPointer = errors.New("target is not a pointer")
	ErrCouldNotDecode   = errors.New("could not decode")
	ErrValidationFailed = errors.New("validation failed")
	ErrOutOfRange       = errors.New("out of range")

	// Field & Data errors
	ErrNilOutput                      = errors.New("output is nil")
	ErrNilField                       = errors.New("field is nil")
	ErrRequiredFieldNotSet            = errors.New("required field is not set")
	ErrRequiredLLMResponseFieldNotSet = errors.New("required llm response field is not set")
	ErrAlreadyExists                  = errors.New("already exists")

	// Job & Process errors
	ErrJobFailed                 = errors.New("job failed")
	ErrUnexpectedNumberOfResults = errors.New("unexpected number of results")
	ErrNotFound                  = errors.New("not found")

	// Operation errors
	ErrFetchFailed     = errors.New("fetch failed")
	ErrParseFailed     = errors.New("parse failed")
	ErrReadFailed      = errors.New("read failed")
	ErrWriteFailed     = errors.New("write failed")
	ErrOpenFailed      = errors.New("open failed")
	ErrCloseFailed     = errors.New("close failed")
	ErrExecFailed      = errors.New("exec failed")
	ErrPublishFailed   = errors.New("publish failed")
	ErrSubscribeFailed = errors.New("subscribe failed")
	ErrDownloadFailed  = errors.New("download failed")
	ErrUploadFailed    = errors.New("upload failed")
	ErrUpsertFailed    = errors.New("upsert failed")
	ErrDeleteFailed    = errors.New("delete failed")
	ErrConnectFailed   = errors.New("connect failed")
	ErrBrowseFailed    = errors.New("browse failed")
	ErrSeedFailed      = errors.New("seed failed")
	ErrMigrationFailed = errors.New("migration failed")
	ErrUnmarshalFailed = errors.New("unmarshal failed")
	ErrMarshalFailed   = errors.New("marshal failed")

	// Capability errors
	ErrNotImplemented = errors.New("not implemented")
	ErrUnsupported    = errors.New("unsupported")

	// Process State errors
	//
	// ErrUnavailable is for a capability the process knows about but that was
	// never wired: an optional dependency left unconfigured, a feature switched
	// off, a subsystem that failed to start. Deliberately distinct from
	// ErrNotFound — a lookup that came back empty tells the caller to fix the
	// query, an unavailable capability tells them to fix the configuration.
	ErrUnavailable  = errors.New("unavailable")
	ErrFailed       = errors.New("failed")
	ErrTimeout      = errors.New("timeout")
	ErrTerminated   = errors.New("terminated")
	ErrKilled       = errors.New("killed")
	ErrClosing      = errors.New("closing")
	ErrClosed       = errors.New("closed")
	ErrShuttingDown = errors.New("shutting down")
	ErrCancelled    = errors.New("cancelled")
	ErrNotReady     = errors.New("not ready")
	ErrInvalidState = errors.New("invalid state")
	ErrExpired      = errors.New("expired")

	// Concurrency & Capacity errors
	ErrLockHeld  = errors.New("lock held")
	ErrConflict  = errors.New("conflict")
	ErrExhausted = errors.New("exhausted")

	// Access & rate-limit errors
	ErrNotAuthenticated = errors.New("not authenticated")
	ErrPermissionDenied = errors.New("permission denied")
	ErrRateLimited      = errors.New("rate limited")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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