Tursox.Error exception (tursox v0.2.1)

Copy Markdown View Source

Stable, redacted error returned by Tursox operations.

SQL parameters and row values are never included in an error.

Summary

Functions

Returns whether an error can safely retry a complete transaction.

Types

code()

@type code() ::
  :busy
  | :busy_snapshot
  | :constraint
  | :readonly
  | :database_full
  | :interrupt
  | :io
  | :corrupt
  | :misuse
  | :conversion
  | :invalid_argument
  | :closed
  | :unsupported
  | :internal

t()

@type t() :: %Tursox.Error{
  __exception__: term(),
  code: code(),
  message: String.t(),
  metadata: map(),
  operation: atom() | nil
}

Functions

retryable?(error)

@spec retryable?(t()) :: boolean()

Returns whether an error can safely retry a complete transaction.