Fail run

failRun(command: RunsFailRunCommand!, idempotencyKey: String): RunsRun!

Arguments

ArgumentTypeRequiredDescription
commandRunsFailRunCommand!Yes
idempotencyKeyStringNoRetry key for this mutation (1-128 characters); overrides Idempotency-Key.

Input fields

command

RunsFailRunCommand

FieldTypeRequiredDescription
runIdID!YesRun for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization.
inputRunsFailRunCommandInput!YesError for a failed run.

Response

Returns RunsRun!. Open the type for its fields and nested types.

FieldTypeDescription
idID!Unique run UUID.
runIdID!Public run ID that run events (metadata.run_id) and runtime tools name. Equals id for runs the server names; older runs keep their run_ ID.
statusString!Current execution state.
projectIdID!Project containing the run.
targetRunsRunTarget!Execution definition; its ID may be null only on historical runs.
inputJSONBusiness input supplied when the run was created.
outputJSONFinal business output; null until successful finalization.
errorRunsRunErrorFailure details, present only when the run failed.

All fields of RunsRun.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation FailRun($command: RunsFailRunCommand!, $idempotencyKey: String) {
  failRun(command: $command, idempotencyKey: $idempotencyKey) {
    id
    projectId
    runId
    status
    createdAt
  }
}
json
{
  "command": {
    "runId": "11111111-1111-4111-8111-111111111111",
    "input": {
      "error": {
        "code": "TASK_FAILED",
        "message": "The task could not be completed."
      }
    }
  }
}