Packages

Elixir client for the Anthropic Messages API — typed content blocks, native tool use, streaming, retries.

Current section

Files

Jump to
anthropic_community lib anthropic messages stream_event error.ex
Raw

lib/anthropic/messages/stream_event/error.ex

defmodule Anthropic.Messages.StreamEvent.Error do
@moduledoc """
A terminal error delivered as the final element of the event stream — either an in-band
`event: error` frame from the API, or a transport-level failure (connection drop, decode
failure, timeout) surfaced this way instead of raising mid-`Stream`.
"""
defstruct [:error]
@type t :: %__MODULE__{error: Anthropic.Error.t()}
end