# `Mailglass.SuppressedError`
[🔗](https://github.com/szTheory/mailglass/blob/v0.1.0/lib/mailglass/errors/suppressed_error.ex#L1)

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`)

See `Mailglass.Error` for the shared contract and `docs/api_stability.md`
for the locked `:type` atom set.

# `t`

```elixir
@type t() :: %Mailglass.SuppressedError{
  __exception__: true,
  cause: Exception.t() | nil,
  context: %{required(atom()) =&gt; term()},
  message: String.t(),
  type: :address | :domain | :address_stream
}
```

# `__types__`
*since 0.1.0* 

```elixir
@spec __types__() :: [atom()]
```

Returns the closed set of valid `:type` atoms. Tested against `docs/api_stability.md`.

# `new`
*since 0.1.0* 

```elixir
@spec new(
  atom(),
  keyword()
) :: t()
```

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.

---

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