pig/run_error

Typed errors and cancellation reasons for agent runs.

Types

Why an active run was cancelled.

pub type CancelReason {
  CallerRequested
  DeadlineExceeded
  ClientDisconnected
  AgentStopped
}

Constructors

  • CallerRequested

    The caller explicitly requested cancellation.

  • DeadlineExceeded

    A collecting adapter reached its deadline.

  • ClientDisconnected

    The process responsible for the client stream exited.

  • AgentStopped

    The owning agent was stopped.

Errors returned while running an agent.

pub type RunError {
  Inference(error: error.AiError)
  Session(error: session_store.SessionError)
  Cancelled(reason: CancelReason)
  RuntimeUnavailable
  Runtime(message: String)
}

Constructors

  • Inference(error: error.AiError)

    The inference provider failed.

  • Session(error: session_store.SessionError)

    Loading or committing the durable session failed.

  • Cancelled(reason: CancelReason)

    The active run was cancelled.

  • RuntimeUnavailable

    The runtime process was no longer available to finish the run.

  • Runtime(message: String)

    The runtime failed independently of inference or session storage.

Errors that prevent a run from being accepted.

pub type RunStartError {
  Busy
  Rejected(error: RunError)
  RuntimeStartUnavailable
}

Constructors

  • Busy

    This agent already has an active run.

  • Rejected(error: RunError)

    Durable recovery or another runtime fence rejected the request.

  • RuntimeStartUnavailable

    The runtime did not accept the request before the start deadline.

Search Document