ExecutionError

org.llm4s.error.ExecutionError
See theExecutionError companion object
@Stable
final case class ExecutionError extends LLMError, RecoverableError

Execution errors that might succeed on retry.

Represents errors from command or process execution that may be transient, such as temporary resource unavailability or intermittent failures. As a RecoverableError, retry strategies can be applied.

Value parameters

cause

Optional underlying exception

context

Additional key-value context for debugging

exitCode

Optional process exit code if applicable

message

Human-readable error description

operation

The operation that failed (e.g., "bash-script", "api-call")

Attributes

Example
val error = ExecutionError("Command failed", "bash-script")
 .withExitCode(1)
 .withContext("command", "npm install")
Companion
object
Graph
Supertypes
trait LLMError
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withContext(key: String, value: String): ExecutionError

Adds a single key-value pair to the error context.

Adds a single key-value pair to the error context.

Attributes

def withContext(entries: Map[String, String]): ExecutionError

Adds multiple key-value pairs to the error context.

Adds multiple key-value pairs to the error context.

Attributes

def withExitCode(code: Int): ExecutionError

Sets the exit code and adds it to the context.

Sets the exit code and adds it to the context.

Attributes

Inherited methods

def code: Option[String]

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

Inherited from:
LLMError
def correlationId: Option[String]

Error correlation IDs for debugging

Error correlation IDs for debugging

Attributes

Inherited from:
LLMError
def formatted: String

Formatted error message with context

Formatted error message with context

Attributes

Inherited from:
LLMError
def maxRetries: Int

Maximum number of retry attempts recommended.

Maximum number of retry attempts recommended.

Attributes

Inherited from:
RecoverableError
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def retryDelay: Option[FiniteDuration]

Suggested delay before retrying.

Suggested delay before retrying.

Attributes

Inherited from:
RecoverableError