ExecutionError

org.llm4s.error.ExecutionError
final case class ExecutionError(message: String, operation: String, exitCode: Option[Int], cause: Option[Throwable], context: Map[String, String]) extends LLMError

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")
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
final override def isRecoverable: Boolean

DEPRECATED: Use type-level markers instead

DEPRECATED: Use type-level markers instead

Attributes

Definition Classes
RecoverableError -> LLMError
Inherited from:
RecoverableError (hidden)
def maxRetries: Int

Maximum number of retry attempts recommended.

Maximum number of retry attempts recommended.

Attributes

Inherited from:
RecoverableError (hidden)
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def retryDelay: Option[Long]

Suggested delay in milliseconds before retrying.

Suggested delay in milliseconds before retrying.

Attributes

Inherited from:
RecoverableError (hidden)