NebulaGraphEx.Error exception (nebula_graph_ex v0.1.8)

Copy Markdown View Source

Represents a NebulaGraph error returned by the server or raised by the client.

Fields

  • :code — the NebulaGraphEx.Error.Code atom (e.g. :e_syntax_error)
  • :code_int — the raw integer error code from the server
  • :message — human-readable error message string, or nil
  • :category — one of :auth, :query, :connection, :server, :client
  • :statement — the nGQL statement that caused the error, if available

Example

iex> {:error, err} = NebulaGraphEx.Graph.query(conn, "INVALID nGQL HERE")
iex> err.code
:e_syntax_error
iex> err.message
"SyntaxError: syntax error near `nGQL'"

Summary

Types

category()

@type category() :: :auth | :query | :connection | :server | :client

t()

@type t() :: %NebulaGraphEx.Error{
  __exception__: true,
  category: category(),
  code: atom(),
  code_int: integer(),
  message: String.t() | nil,
  statement: String.t() | nil
}