# `Exfacebook.Error`
[🔗](https://github.com/oivoodoo/exfacebook/blob/v0.2.0/lib/exfacebook/error.ex#L1)

Graph API error.

Facebook error payloads look like:

    %{
      "message" => "...",
      "type" => "OAuthException",
      "code" => 190,
      "error_subcode" => 460,
      "fbtrace_id" => "..."
    }

Source: https://developers.facebook.com/docs/graph-api/guides/error-handling

# `t`

```elixir
@type t() :: %Exfacebook.Error{
  code: integer() | nil,
  error_subcode: integer() | nil,
  fbtrace_id: String.t() | nil,
  message: String.t(),
  status_code: integer() | nil,
  type: String.t() | nil
}
```

# `from_graph`

```elixir
@spec from_graph(integer() | nil, map(), String.t() | nil) :: t()
```

Build an error from a Graph API `"error"` object.

---

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