LLMError

org.llm4s.error.LLMError
See theLLMError companion object
trait LLMError extends Product, Serializable

Enhanced comprehensive error hierarchy for LLM operations using ADTs.

This replaces the simple org.llm4s.llmconnect.model.LLMError with a much more comprehensive error system.

Key improvements over legacy version:

  • Structured context information
  • Recovery guidance built-in - Trait-based recoverability
  • Provider-agnostic design
  • Rich error formatting
  • Type-safe error handling
  • Private case class constructors with smart constructors

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Abstract methods

def message: String

Human-readable error message

Human-readable error message

Attributes

Concrete methods

def code: Option[String]

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

def context: Map[String, String]

Additional context information

Additional context information

Attributes

def correlationId: Option[String]

Error correlation IDs for debugging

Error correlation IDs for debugging

Attributes

def display: String
Implicitly added by LLMErrorDisplayOps
def formatted: String

Formatted error message with context

Formatted error message with context

Attributes

def show: String
Implicitly added by LLMErrorDisplayOps

Deprecated methods

def isRecoverable: Boolean

DEPRECATED: Use type-level markers instead

DEPRECATED: Use type-level markers instead

Attributes

Deprecated
[Since version 0.1.9] Use pattern matching on RecoverableError/NonRecoverableError traits

Inherited methods

def productElementName(n: Int): String

Attributes

Inherited from:
Product
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def productPrefix: String

Attributes

Inherited from:
Product

Inherited and Abstract methods

def canEqual(that: Any): Boolean

Attributes

Inherited from:
Equals
def productArity: Int

Attributes

Inherited from:
Product
def productElement(n: Int): Any

Attributes

Inherited from:
Product