SimpleError

org.llm4s.error.SimpleError
See theSimpleError companion object
final case class SimpleError extends LLMError

A simple error with just a message and no additional context.

Use this error type for basic error cases where no structured context is needed. For errors with more context, prefer specific error types like ValidationError or ConfigurationError.

Value parameters

message

Human-readable error description

Attributes

Example
val error = SimpleError("Something went wrong")
error.message  // "Something went wrong"
error.context  // Map.empty
Companion
object
Graph
Supertypes
trait LLMError
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def code: Option[String]

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

Inherited from:
LLMError
def context: Map[String, String]

Additional context information

Additional context information

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
NonRecoverableError -> LLMError
Inherited from:
NonRecoverableError (hidden)
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product