Renders sanitized public error envelopes for supported HTTP protocols.
Internal terms and exception details must be projected before this boundary. This module accepts only stable message/code fields and chooses the native Anthropic Messages envelope when the request path targets that API.
Summary
Types
Functions
@spec openai_error(pos_integer(), map()) :: error_map()
@spec openai_error(pos_integer(), String.t(), term()) :: error_map()
@spec send(Plug.Conn.t(), pos_integer(), String.t(), term()) :: Plug.Conn.t()
@spec send_anthropic(Plug.Conn.t(), pos_integer(), String.t(), term()) :: Plug.Conn.t()
@spec send_openai(Plug.Conn.t(), pos_integer(), map()) :: Plug.Conn.t()
@spec send_openai(Plug.Conn.t(), pos_integer(), String.t(), term()) :: Plug.Conn.t()