# `ExFattureincloud.Error`
[🔗](https://github.com/elchemista/ex_fattureincloud/blob/v0.1.0/lib/ex_fattureincloud/error.ex#L1)

Normalized validation, authentication, transport, HTTP or protocol error.

API validation details remain in `body`. `code` also handles OAuth string errors
such as `authorization_pending`. `retry_after` is in seconds. `cause` preserves
the transport exception. Inspect excludes body, headers and cause.

# `t`

```elixir
@type t() :: %ExFattureincloud.Error{
  __exception__: term(),
  body: term(),
  cause: term(),
  code: term(),
  headers: map(),
  kind: atom(),
  message: String.t(),
  rate_limit: ExFattureincloud.RateLimit.t() | nil,
  retry_after: integer() | nil,
  status: integer() | nil
}
```

# `from_req`

```elixir
@spec from_req(Req.Response.t()) :: t()
```

Converts an unsuccessful Req response while preserving its body and quota headers.

# `validation`

```elixir
@spec validation(String.t()) :: t()
```

Builds a local parameter-validation error without an HTTP status.

---

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