# `Boop.Error`
[🔗](https://github.com/chrisgreg/boop_ex/blob/v1.0.0/lib/boop/error.ex#L1)

Why a send failed. Returned as `{:error, %Boop.Error{}}`; never raised.

`code` is one of:

  * `:invalid` — the event failed local validation (nothing was sent)
  * `:not_configured` — no `url` or `api_key`
  * `:unauthorized` — the server rejected the API key (401)
  * `:rejected` — the server rejected the event (400/413/422); see `message`
  * `:server_error` — the server failed (5xx) after retries
  * `:unreachable` — network error or timeout after retries
  * `:unexpected` — anything else, including exceptions

# `code`

```elixir
@type code() ::
  :invalid
  | :not_configured
  | :unauthorized
  | :rejected
  | :server_error
  | :unreachable
  | :unexpected
```

# `t`

```elixir
@type t() :: %Boop.Error{
  code: code(),
  details: term(),
  message: String.t(),
  status: non_neg_integer() | nil
}
```

# `retryable?`

```elixir
@spec retryable?(t()) :: boolean()
```

Whether retrying the same request could succeed.

---

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