# `Attio.Error`
[🔗](https://github.com/sgerrand/ex_attio/blob/v0.2.0/lib/attio/error.ex#L1)

Represents an error response from the Attio API.

All four fields are populated from the JSON error body returned by the API:

    %Attio.Error{
      status: 404,
      type: "invalid_request_error",
      code: "not_found",
      message: "Object 'foobar' not found."
    }

Transport errors (connection failures, timeouts) are returned as the
underlying exception rather than `Attio.Error`.

# `t`

```elixir
@type t() :: %Attio.Error{
  code: String.t(),
  message: String.t(),
  status: non_neg_integer(),
  type: String.t()
}
```

---

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