Runtime error codes

Sixb failures have two identities:

  • code is stable and intended for programmatic decisions.
  • message is written for humans and must not be parsed.

Unknown legacy exceptions use internal.unexpected until their call site receives a specific code.

API errors

HTTP errors expose an optional code while endpoints migrate. The client copies it to SixbApiError.code.

Always tolerate unknown codes: a newer server may introduce one before the client is upgraded.

TS
if (isSixbApiError(error) && error.code === "dataset.not_found") {
  // Recover without depending on the human-readable message.
}

Failure records

Persisted failures and API responses use the same portable record:

TS
interface SixbFailure<TCode extends SixbErrorCode = SixbErrorCode> {
  readonly code: TCode
  readonly message: string
  readonly retryable: boolean
  readonly at: string
  readonly details?: JsonValue
  readonly truncated?: true
}

Messages are safe, bounded summaries owned by Sixb. Native errors, stacks, and causes stay on the private error argument passed to onError; they are never copied into storage or API responses. truncated indicates that optional context exceeded the durable failure size budget.

retryable is the policy attached to the code. It does not override a worker's safety rules; a worker may still refuse to replay work that has already produced side effects.

Contracts by boundary

Each boundary exposes only the codes it can persist.

BoundaryAllowed codes
Action run or phaseaction.phase_failed, internal.unexpected, queue.enqueue_failed, runtime.cancelled
Sync runinternal.unexpected, queue.enqueue_failed, runtime.cancelled, sync.execution_failed
Agent executionagent.execution_failed, internal.unexpected, runtime.cancelled
Connector connection runconnector.adapter_invalid, connector.authorization_invalid, connector.authorization_required, connector.credentials_unavailable, connector.not_found, connector.operation_conflict, connector.operation_in_progress, connector.provider_failed, connector.provider_unavailable, internal.unexpected
Projection runinternal.unexpected, projection.execution_failed, queue.enqueue_failed, runtime.cancelled
Pipeline run or stepinternal.unexpected, pipeline.step_failed, queue.enqueue_failed, runtime.cancelled
Workflow run or nodeinternal.unexpected, runtime.cancelled, workflow.node_failed
Webhook runinternal.unexpected, webhook.delivery_failed, webhook.delivery_rejected
Ontology outboxevent.delivery_failed

Additional rules:

  • Action failures require { actionId, runId, phase } in details.
  • Agent, Pipeline, Sync, and Workflow completion events reuse the failure stored on the run.
  • agent.run.finished.error reuses the failure stored on the Agent run.
  • Webhook retryability is carried by the persisted failure: retryable outcomes use webhook.delivery_failed; terminal handler responses use webhook.delivery_rejected.
  • The outbox retains event.delivery_failed while publication is retried.

Reporting

  • context.failure is the same record written to durable storage when one exists.
  • error remains the native error for stacks and monitoring integrations.
  • Failures without durable storage are normalized once at the reporting boundary.

Normalization

  • Coded errors receive their details where they are created.
  • Native or out-of-contract errors use one typed capture policy at the boundary.

Error catalog

CodeRetryableWhat happenedWhat to do
action.phase_failedNoAn Action phase could not complete successfully.Inspect details.phase and the native error reported to onError.
agent.execution_failedNoAn active Agent execution failed.Inspect the run identity and the native error reported to onError.
connector.adapter_invalidNoA connector adapter returned data that violates its Sixb contract.Fix or upgrade the adapter before retrying.
connector.authorization_invalidNoAn OAuth connection run or authorization transition is no longer valid.Start a new connector connection run.
connector.authorization_requiredNoThe connection cannot provide credentials in its current state.Reauthorize the connector and select an account when requested.
connector.configuration_invalidNoConnector definitions, storage, or credential protection are misconfigured.Fix the connector runtime configuration and restart Sixb.
connector.credentials_unavailableNoStored connector credentials failed validation or authenticated decryption.Verify the encryption key and reauthorize affected connections.
connector.not_foundNoA connector definition, connection, authorization, or account was not found in the current project.Check the identifier or reconnect the account.
connector.operation_conflictNoConnector state changed incompatibly with the requested operation.Reload current connection state and start a new operation explicitly.
connector.operation_in_progressYesAnother process is safely mutating the same authorization credentials.Retry after the current credential operation finishes.
connector.provider_failedNoA provider operation failed or ended with an ambiguous outcome.Inspect the native cause; restart authorization when Sixb failed closed.
connector.provider_unavailableYesThe adapter guaranteed that a failed provider operation produced no external change.Retry the unchanged operation later.
connector.replacement_requiredNoAccount selection would replace the connection currently assigned to the slot.Confirm replacement, then retry selection with replace: true, or choose another slot.
connector.revocation_pendingYesLocal access is disconnected, but provider revocation has not been durably confirmed.Retry revocation; the operation is idempotent and local access remains closed.
dataset.not_foundNoDataset is unavailable to the caller.Check its ID and access policy.
dataset.version_incompatibleNoVersion does not match the required dataset or schema.Materialize a compatible version.
dataset.version_not_foundNoVersion does not exist or nothing has been committed yet.Check the ID or materialize the dataset.
dataset.version_read_inconsistentYesRead results conflict with immutable version metadata.Retry, then inspect lake storage integrity.
event.delivery_failedYesA persisted event could not reach the event stream.Let the outbox retry; inspect the broker if it persists.
internal.unexpectedNoThe exception has no specific code yet.Inspect its onError report and correlation details.
pipeline.step_failedNoA step failed before committing its output.Fix the cause and request a new pipeline run.
projection.definition_invalidNoProjection definition is invalid for its ontology or dataset.Fix the definition and request a new run.
projection.execution_failedNoProjection materialization failed permanently.Inspect the projection, pinned dataset version, and onError report.
projection.not_foundNoProjection is not registered.Check its ID and deployment.
projection.run_already_terminalNoDelivery targets a run that is already terminal.Use a new run ID for new work.
projection.run_identity_mismatchNoDelivery does not match the run's pinned identity.Discard it and dispatch from the current definition.
queue.enqueue_failedYesA job could not be handed to its queue.Retry the unchanged request while the durable run remains in its enqueue phase.
runtime.cancelledNoWork was cancelled before completion.Confirm the cancellation before requesting another run.
sync.execution_failedNoA Sync failed while reading, validating, or writing its dataset.Inspect the onError report, fix the source or data, then request a new run.
webhook.delivery_failedYesA claimed webhook delivery failed retryably.Let the provider retry; inspect the handler if it persists.
webhook.delivery_rejectedNoA webhook handler returned a terminal non-success response.Inspect the handler response and provider payload before sending a new delivery.
workflow.node_failedNoA node failed during preparation or execution.Inspect its identity and the native error reported to onError.

Search docs

Search the documentation