# `Aludel.Interfaces.LLM.ErrorParser`
[🔗](https://github.com/ccarvalho-eng/aludel/blob/main/lib/aludel/interfaces/llm/error_parser.ex#L1)

Shared error parsing logic for LLM provider adapters.

Normalizes HTTP errors to consistent error tuples across all providers.

# `parse_error`

```elixir
@spec parse_error(term()) ::
  {:error,
   {:auth_error, String.t()}
   | {:rate_limit, nil}
   | {:invalid_request, String.t()}
   | {:api_error, integer(), String.t()}
   | {:network_error, term()}}
```

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}}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
