Error struct for Bot API failures.
Fields: :message, :status (HTTP status), :body (raw decoded body),
:reason (Telegram error_code), :summary (Telegram description),
:tag (:api | :rate_limited | :http | :transport | :config | :validation),
:retry_after (seconds, from a 429's parameters.retry_after).
Text is redacted: bot tokens never appear in message/summary output.
Summary
Functions
Configuration error (e.g. missing token).
Build an error from an HTTP response. Telegram envelope:
%{"ok" => false, "error_code" => 429, "description" => "...", "parameters" => %{"retry_after" => 5}}.
Wrap a transport (network) exception; the message is token-redacted.
Client-side validation error (bad arguments before any request).
Types
Functions
@spec config(atom(), String.t(), Noizu.Telegram.Client.t() | nil) :: t()
Configuration error (e.g. missing token).
@spec from_response(integer(), term(), Noizu.Telegram.Client.t() | nil) :: t()
Build an error from an HTTP response. Telegram envelope:
%{"ok" => false, "error_code" => 429, "description" => "...", "parameters" => %{"retry_after" => 5}}.
@spec transport(Exception.t(), Noizu.Telegram.Client.t() | nil) :: t()
Wrap a transport (network) exception; the message is token-redacted.
@spec validation(atom(), String.t(), Noizu.Telegram.Client.t() | nil) :: t()
Client-side validation error (bad arguments before any request).