Skip to content
Solti API Contracts 0.1source v0.1.1

Task API errors

Use the gRPC status code as the top-level machine-readable category. Status messages and cause messages are diagnostics for operators; clients must not parse them to choose behavior.

Handle status codes

gRPC codeMeaning
InvalidArgumentThe request, selector, continuation token, phase, or page limit is invalid.
UnauthenticatedThe configured authentication boundary did not accept a credential.
PermissionDeniedThe authenticated identity is not allowed to perform the operation.
AlreadyExistsCreateTask targeted an existing Task name.
AbortedA write precondition did not match the current Task. Decode WriteConflictDetails.
NotFoundThe requested Task or public resource does not exist or is not visible.
UnimplementedThe serving application does not implement the requested operation.
ResourceExhaustedA request or response item is too large, or configured service capacity is exhausted.
OutOfRangeThe requested collection, run, or watch position is no longer retained.
UnavailableThe service is shutting down or cannot currently accept work.
InternalAn unexpected server failure occurred; the client receives no internal diagnostic.

Authentication and authorization policy are deployment-owned. Unauthenticated and PermissionDenied apply when the serving application enables those boundaries.

Decode write conflicts

ApplyTask, CancelTask, and DeleteTask can carry WritePreconditions. A mismatch returns Aborted, and the raw gRPC status-details bytes encode one WriteConflictDetails message.

Each WriteConflictCause has a typed reason:

ReasonRelated fieldMeaning
WRITE_CONFLICT_REASON_UID_MISMATCHpreconditions.uidThe requested UID differs from the stored Task incarnation.
WRITE_CONFLICT_REASON_RESOURCE_VERSION_MISMATCHpreconditions.resourceVersionThe requested resource version differs from the stored revision.
WRITE_CONFLICT_REASON_PRECONDITION_FAILEDoptionalA failed precondition has no more specific v1 category.

The agent does not intentionally emit WRITE_CONFLICT_REASON_UNSPECIFIED. Branch on the enum reason, use field to locate the failed request value, and present message only as a readable diagnostic.

Treat stream failures as terminal

A watch can begin successfully and later terminate with a gRPC status. In particular, OutOfRange means the retained watch position expired; start a new list-and-watch cycle instead of replaying the same resource version.

Live output is lossy by contract. A Lagged event is an observation gap inside a healthy stream, while a terminal gRPC status ends the stream itself.

Open-source task execution components.