EctoHrana.Error exception (EctoHrana v0.1.0)

Copy Markdown View Source

An error of the server or of the transport.

  • :message - for a server error, SQLite's message, e.g. "UNIQUE constraint failed: users.name" (the server's "SQLite error: " prefix is removed, so that ecto_sqlite3 recognises constraint errors);
  • :code - the SQLite error code, e.g. "SQLITE_CONSTRAINT_UNIQUE", or nil for a transport error (network, HTTP status);
  • :statement - the SQL of the statement that failed.

Summary

Types

t()

@type t() :: %EctoHrana.Error{
  __exception__: term(),
  code: String.t() | nil,
  message: String.t(),
  statement: String.t() | nil
}