Raised when delivery is blocked by the suppression list.
Suppression is a permanent policy block — the recipient opted out,
hard-bounced, or the tenant explicitly excluded them. Never retryable.
The :type atoms mirror Mailglass.Suppression.scope for 1:1 match.
Types
:address— the recipient address is globally suppressed:domain— the recipient domain is globally suppressed:address_stream— the recipient is suppressed for a specific stream (e.g.:bulk)
Context
Suppression-hit context stays PII-safe while carrying enough diagnostic detail for callers:
:tenant_id— stamped tenant:stream— current message stream:reason— suppression reason atom:source— suppression source class/string:expires_at— expiry timestamp ornil
See Mailglass.Error for the shared contract and docs/api_stability.md
for the locked :type atom set.
Summary
Functions
Returns the closed set of valid :type atoms. Tested against docs/api_stability.md.
Build a Mailglass.SuppressedError struct.
Types
@type t() :: %Mailglass.SuppressedError{ __exception__: true, cause: Exception.t() | nil, context: %{ optional(:tenant_id) => String.t(), optional(:stream) => atom() | nil, optional(:reason) => atom() | nil, optional(:source) => String.t() | nil, optional(:expires_at) => DateTime.t() | nil, optional(atom()) => term() }, message: String.t(), type: :address | :domain | :address_stream }
Functions
Returns the closed set of valid :type atoms. Tested against docs/api_stability.md.
Build a Mailglass.SuppressedError struct.
Options
:cause— an underlying exception to wrap (kept out of JSON output).:context— a map of non-PII metadata about the suppression record.