A server-returned ArcadeDB error, normalized to a typed reason.
Exception messages and inspection omit the raw response's diagnostic
fields. Read error.detail explicitly during controlled debugging and
keep it out of logs.
reason taxonomy
Server-derived (mapped from the HTTP response or gRPC status and trailers):
:not_idempotent— a write reached the read-only/queryendpoint (QueryNotIdempotentException).:parse_error— the statement failed to parse (Parsing/ParseException).:unauthorizedfor missing credentials, rejected credentials, or a request that the server forbids. ArcadeDB can also forbid an import or restore source.:database_not_foundfor an absent database. Also covers the equivalent server classesDatabaseOperationException,DatabaseNotAvailableException, andDatabaseNotFoundException.:transaction_error— a transaction-lifecycle failure, both server-derived (TransactionException) and client-raised (no active/already-open session; a Bolt commit failure).:concurrent_modification— an optimistic-concurrency conflict (ConcurrentModificationException/NeedRetryException).:duplicate_key— a confirmed unique-index violation (DuplicatedKeyException).:already_exists— a taken name or an unclassified gRPC conflict.:partial_commit— the server reports that part of a gRPC write committed.:grpc_rejected— a terminal gRPC status without a classified server exception.:aborted,:failed_precondition, and:resource_exhausted— gRPC rejection statuses 10, 9, and 8 without a more specific known exception.:cursor_buffer_exceeded— a gRPC cursor exceeded its unread response budget.:outcome_unknown— a dispatched operation has an unconfirmed effect. This reason is returned inArcadic.TransportError, including when ArcadeDB explicitly reports an unconfirmed transaction outcome.:timeout— the server reported a timeout (TimeoutException).:not_leader— the target node is not the cluster leader and could not forward the write (ServerIsNotTheLeaderException, HTTP 400). A managed-retrytransaction/3and multi-host failover treat it as retriable (the write was rejected, nothing applied).:http_redirect— an HTTP 3xx response. The client declines to follow it and reports only the status.:invalid_begin_body— a malformedisolationLevelin a transaction-begin body.:server_error— the generic fallback: an unrecognized HTTP 400 body, or anexceptionFQN that matches none of the above.
The client also produces errors while validating calls or interpreting responses.
:use_explain—query/command(either transport) orquery_stream(HTTP) was called on a statement that already carries anEXPLAIN/PROFILEprefix, which returns a plan rather than rows; callexplain/4/profile/4instead. The guard is response-layer: HTTP viaArcadic.Result.normalize/1, Bolt via theexecute/4plan-presence check.:not_supported— the active transport doesn't implement the called capability (e.g.explain/4against a transport without it, HTTP streaming inside a transaction, Bolt's admin-only calls, async writes withoutexecute_async/3).:unexpected_response— a 2xx response whose body is off the documented contract (client-raised by the time-series read paths andlist_databases; the body is never echoed).:invalid_params— a caller param or statement that cannot be encoded for the wire (an invalid-UTF-8 binary, a term with no JSON/gRPC representation). Raised by the boundary, never as a mid-encode exception echoing the value.:import_failed— an import whose 2xx result row itself reported"result" => "FAIL"(current ArcadeDB reports import-setting failures in the row, not the HTTP status).:interrupted_migration—Arcadic.Migratorfound anup_started/down_startedmarker from an attempt whose outcome is unknown; reconcile viaArcadic.Migrator.resolve/3(versions viaArcadic.Migrator.interrupted/1).:invalid_state— aMigrator.resolve/3transition was attempted against a non-interrupted version or matched no rows.:invalid_transport_options— contradictory transport options (e.g. both:cacertfileand:cacertson a gRPC conn).:transaction_unsupported— the transport cannot include the operation in an open transaction.
A separate, non-Arcadic.Error convention: several admin validators reject
bad input as a bare atom tuple, never this struct, and never echoing the
offending value — {:error, :invalid_identifier} (Arcadic.Identifier.validate/1,
e.g. a bad database/type name), {:error, :invalid_setting_key} /
{:error, :invalid_setting_value} (Arcadic.Server.set_server_setting/3 and
set_database_setting/3), {:error, :invalid_url}
(Arcadic.Backup.backup/2's :to target and restore/3's source URL, via
Arcadic.Identifier.validate_url/1), {:error, :invalid_user_spec}
(Arcadic.Security.create_user/2 — an unencodable user spec, e.g. a non-UTF-8 password),
{:error, :unencodable_body} (Arcadic.Function.define/4 and Arcadic.Trigger.create/4 —
a body containing the sole breakout byte, a backslash, or a control/line byte, none of which
ArcadeDB's "..." DDL literal can escape), and, from Arcadic.Changes,
{:error, :mint_web_socket_not_available} (start_link/1, when the optional
mint_web_socket dependency is absent), {:error, :subscriber_conflict}
(subscribe/3, a second subscriber pid on an already-bound process), and the
start_link/1 conn-shape rejections {:error, :invalid_conn} (no/invalid
:conn), {:error, :invalid_auth} (an auth shape other than {user, pass} /
{:bearer, token}), {:error, :invalid_url_scheme} (a base_url scheme
outside http/https/ws/wss — guards against a silent plaintext
downgrade), and {:error, :invalid_max_buffer} (a non-positive-integer
:max_buffer).
Summary
Types
Graph batch progress reported on failure. Counts are upper bounds on durable writes, since ArcadeDB can buffer records before committing them.
Functions
Build an Arcadic.Error from an HTTP status and a decoded ArcadeDB error body.
Types
@type batch_progress() :: %{ partial_commit: boolean(), vertices_created: non_neg_integer(), edges_created: non_neg_integer() }
Graph batch progress reported on failure. Counts are upper bounds on durable writes, since ArcadeDB can buffer records before committing them.
@type t() :: %Arcadic.Error{ __exception__: term(), batch_progress: batch_progress() | nil, detail: String.t() | nil, exception: String.t() | nil, http_status: pos_integer() | nil, message: String.t() | nil, reason: atom() }
Functions
@spec from_response(pos_integer(), map()) :: t() | Arcadic.TransportError.t()
Build an Arcadic.Error from an HTTP status and a decoded ArcadeDB error body.