docs-internal/engine/ACTOR_ERRORS.md
Actor errors come from two sources:
ActorError)Errors use a two-layer representation:
ActorError - Internal enum stored in workflow state (NoCapacity, RunnerNoResponse)ActorError - API-facing enum with enriched context (PoolError, NoCapacity, RunnerNoResponse)The runner pool error tracker monitors serverless endpoint health. When errors occur, it stores them with timestamps. Errors are cleared after 3 consecutive successes (hysteresis).
Stored in actor workflow state as failure_reason:
runner_id)Set when:
Tracked separately by runner_pool_error_tracker workflow for serverless configs:
ServerlessHttpError - HTTP error (status code, body)ServerlessStreamEndedEarly - SSE stream ended before runner initializedServerlessConnectionError - Network/connection errorServerlessInvalidBase64 - Invalid base64 in SSE messageServerlessInvalidPayload - Invalid protocol payloadInternalError - Internal errors (namespace not found, config not found, etc.)The error tracker:
active_error with timestampWhen fetching actors via the API (pegboard::ops::actor::get):
failure_reason: NoCapacityPoolError with detailsNoCapacityThis provides users with actionable error info (e.g., "serverless endpoint returned 500") instead of generic "no capacity".
When guard is waiting for an actor to become ready:
actor_runner_failed immediatelyThis prevents clients from waiting the full ready timeout when the runner pool is known to be failing.
The runner configs list endpoint enriches serverless configs with current pool errors:
pool_error field---
config:
theme: mc
look: classic
---
flowchart TD
subgraph Sources
AWF[Actor Workflow]
SE[Serverless Endpoint]
end
subgraph Storage
WFS[Workflow State
failure_reason: ActorError]
ET[Error Tracker Workflow
active_error: RunnerPoolError]
end
subgraph Consumers
API[Actor Get API]
Guard[Guard Fail-Fast]
RC[Runner Configs API]
end
AWF -->|NoCapacity
RunnerNoResponse| WFS
SE -->|Connection errors| ET
WFS --> API
ET --> API
API -->|ActorError| Client1[Client]
ET --> Guard
Guard -->|actor_runner_failed| Client2[Client]
ET --> RC
RC -->|pool_error| Dashboard[Dashboard]