LeXtract.Error.External.Annotation exception (lextract v0.1.2)
View SourceError for LLM annotation/inference failures.
Raised when LLM API calls fail, including network errors, rate limits, authentication issues, or invalid responses.
Examples
iex> error = LeXtract.Error.External.Annotation.exception(
...> reason: "API rate limit exceeded"
...> )
iex> Exception.message(error)
"LLM annotation failed: API rate limit exceeded"
iex> error = LeXtract.Error.External.Annotation.exception(
...> reason: "request timeout",
...> request_details: %{model: "gemini-2.0-flash", chunk_id: 5}
...> )
iex> String.contains?(Exception.message(error), "gemini-2.0-flash")
true
Summary
Functions
Create an Elixir.LeXtract.Error.External.Annotation without raising it.
Formats the error message for LLM annotation failures.
Types
Functions
@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.External.Annotation{ __exception__: true, bread_crumbs: term(), class: term(), path: term(), reason: term(), request_details: term(), splode: term(), stacktrace: term(), vars: term() }
Create an Elixir.LeXtract.Error.External.Annotation without raising it.
Keys
- :reason
- :request_details
Formats the error message for LLM annotation failures.