A failed chunk with its byte position in the source and error reason.
reason is deliberately open (term/0): it funnels whatever the
failing layer reported. Common shapes, non-exhaustive:
LangExtract.Provider.error/0— the LLM request failed, e.g.{:rate_limited, ms}or:server_erroronce retries are exhausted{:invalid_format, message}or:missing_extractions— the LLM reply didn't parse{:task_exit, reason}— the chunk task crashed or timed out:drained— the runner shut down before the chunk started
Summary
Functions
Builds an error carrying chunk's byte range.
Types
@type t() :: %LangExtract.ChunkError{ byte_end: non_neg_integer(), byte_start: non_neg_integer(), reason: term() }
Functions
@spec from_chunk(LangExtract.Chunker.Chunk.t(), term()) :: t()
Builds an error carrying chunk's byte range.