Exfacebook.Error (exfacebook v0.2.0)

Copy Markdown View Source

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

Summary

Functions

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

Types

t()

@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
}

Functions

from_graph(status_code, error, raw \\ nil)

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

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