# `LlmCall.HTTP.Error`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/http/error.ex#L1)

Raised when a streaming call fails after `LlmCall.stream/3` has returned.

An `Enumerable` cannot return a tagged tuple, so a non-`2xx` response, an
unparseable payload, or a provider error event raises this exception with the
decoded `%LlmCall.Error{}` in `:error`.

Use `LlmCall.complete/3` for a tuple-returning call, or rescue this exception
and read `error/1`.

# `t`

```elixir
@type t() :: %LlmCall.HTTP.Error{__exception__: term(), error: LlmCall.Error.t()}
```

# `error`

```elixir
@spec error(t()) :: LlmCall.Error.t()
```

The canonical error carried by the exception.

---

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