Aludel.Interfaces.LLM.ErrorParser (aludel v0.1.18)

Copy Markdown View Source

Shared error parsing logic for LLM provider adapters.

Normalizes HTTP errors to consistent error tuples across all providers.

Summary

Functions

Parses HTTP errors into standardized error tuples.

Functions

parse_error(error)

Parses HTTP errors into standardized error tuples.

Examples

iex> parse_error(%{status: 401})
{:error, {:auth_error, "Invalid API key"}}

iex> parse_error(%{status: 429})
{:error, {:rate_limit, nil}}