Failure

org.llm4s.rag.loader.LoadResult.Failure
final case class Failure(source: String, error: LLMError, recoverable: Boolean, documentId: Option[String]) extends LoadResult

Failed to load document.

documentId tells RAG.sync which indexed document the failure is about, since source is a path or key and not the id Documents are indexed under. A loader sets it when the failure concerns exactly one document that the source still lists - an S3 object whose read or extraction failed - and sync then keeps that document as indexed: not deleted, not counted as changed. It leaves it None when it cannot name the document, or when the failure may hide others (a crawled page whose links were never followed); sync then cannot tell which unlisted documents are really gone, and skips its deletion pass for that run.

Value parameters

documentId

The id the document is (or would be) indexed under, when the loader knows it

error

The error that occurred

recoverable

Whether the error is potentially recoverable (e.g., timeout)

source

Identifier for the failed source (path, URL, etc.)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait LoadResult
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def isSuccess: Boolean

Inherited methods

def isFailure: Boolean

Attributes

Inherited from:
LoadResult
def isSkipped: Boolean

Attributes

Inherited from:
LoadResult
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def toOption: Option[Document]

Get document if successful

Get document if successful

Attributes

Inherited from:
LoadResult