errorcode

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package errorcode is the canonical registry for stable public Fenced error codes. Internal errors must be translated to one of these codes before they cross an Agent, SDK, API, artifact, event, or audit boundary.

Index

Constants

View Source
const (
	Internal                 = "INTERNAL_ERROR"
	InvalidTask              = "INVALID_TASK"
	InvalidWorkflow          = "INVALID_WORKFLOW"
	ResourceVersionConflict  = "RESOURCE_VERSION_CONFLICT"
	IdempotencyConflict      = "IDEMPOTENCY_CONFLICT"
	AuthenticationRequired   = "AUTHENTICATION_REQUIRED"
	PolicyDenied             = "POLICY_DENIED"
	TenantQuotaExceeded      = "TENANT_QUOTA_EXCEEDED"
	BudgetExhausted          = "BUDGET_EXHAUSTED"
	WallTimeExceeded         = "WALL_TIME_EXCEEDED"
	ProviderUnavailable      = "PROVIDER_UNAVAILABLE"
	ProviderRejected         = "PROVIDER_REJECTED"
	ProviderStreamAborted    = "PROVIDER_STREAM_ABORTED"
	ToolInvocationFailed     = "TOOL_INVOCATION_FAILED"
	OutputContractViolation  = "OUTPUT_CONTRACT_VIOLATION"
	WorkflowDeadlineExceeded = "WORKFLOW_DEADLINE_EXCEEDED"
	WorkflowBudgetExhausted  = "WORKFLOW_BUDGET_EXHAUSTED"
	SpawnDisabled            = "SPAWN_DISABLED"
	SpawnCancelled           = "SPAWN_CANCELLED"
	SpawnDeadlineExceeded    = "SPAWN_DEADLINE_EXCEEDED"
	SpawnBudgetExhausted     = "SPAWN_BUDGET_EXHAUSTED"
	SpawnDepthExceeded       = "SPAWN_DEPTH_EXCEEDED"
	SpawnFanoutExceeded      = "SPAWN_FANOUT_EXCEEDED"
	SpawnDynamicExceeded     = "SPAWN_DYNAMIC_LIMIT_EXCEEDED"
	SpawnTotalStepsExceeded  = "SPAWN_TOTAL_STEPS_EXCEEDED"
	SpawnTaskLimitExceeded   = "SPAWN_TASK_LIMIT_EXCEEDED"
	SpawnTokenLimitExceeded  = "SPAWN_TOKEN_LIMIT_EXCEEDED"
	SpawnCostLimitExceeded   = "SPAWN_COST_LIMIT_EXCEEDED"
	SpawnNameConflict        = "SPAWN_NAME_CONFLICT"
	// SpawnReconciliationPending pauses dynamic spawning while a workflow's
	// step budget reservations are being re-derived after an upgrade: the
	// committed total is briefly understated, so admitting a new spawn could
	// slip past a ceiling. The agent should retry once reconciliation clears.
	SpawnReconciliationPending = "SPAWN_RECONCILIATION_PENDING"
)

Variables

This section is empty.

Functions

func All

func All() []string

func Known

func Known(code string) bool

Types

type Class

type Class string

Class is the public disposition of an error code (P3-04): it tells every SDK, agent and operator what to do next without inspecting message text. The stable code strings never change; the class is metadata carried alongside them.

const (
	// Retryable: the same request may succeed after a bounded backoff
	// (transient infrastructure state).
	Retryable Class = "retryable"
	// Terminal: retrying the identical request can never succeed.
	Terminal Class = "terminal"
	// UserActionRequired: only the caller (tenant/publisher) can change the
	// outcome — by fixing the request, credentials, grants or budgets.
	UserActionRequired Class = "user-action-required"
	// OperatorActionRequired: only a platform operator can change the
	// outcome (infrastructure or internal failure).
	OperatorActionRequired Class = "operator-action-required"
)

func ClassOf

func ClassOf(code string) (Class, bool)

ClassOf returns the public disposition of one error code. Every known code has exactly one class; an unknown code reports not-ok so callers fail closed instead of guessing a retry policy for an unrecognized string.

Jump to

Keyboard shortcuts

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